How to exclude URLs/blocks/words from translation?

In this article, you'll learn how to exclude specific URLs, blocks, or words from being translated on your website.




1. Exclude URLs

Using Weglot, you can exclude certain pages from being translated. These pages will remain untranslated.


a. Exclude URLs using Exclusion Rules

To exclude a URL, navigate to your Weglot Dashboard > Project > Settings > Translation Exclusions.

Click on the "Add Rule" button. Add the relative URL of the page you wish to exclude. For instance, for www.mywebsite.com/page1, only add its relative URL: /page1.

You can set URL exclusions using different options.

  • Starts with: Excludes all pages with a slug starting with the input.
  • Does not start with: Excludes all pages with a slug that does not start with the input.
  • Ends with: Excludes all pages with a slug ending with the input.
  • Does not end with: Excludes all pages with a slug that does not end with the input.
  • Is exactly: Excludes the page with a slug identical to the input.
  • Is not exactly: Excludes all pages with a slug that is not identical to the input.
  • Contains: Excludes all pages with a slug containing the input.
  • Does not contain: Excludes all pages with a slug that does not contain the input.
  • Matches regex: Excludes pages matching the regex input.



You can choose to exclude the URL for all languages or only specific ones. If you need to exclude the page for all language this space should be left empty.

You can also decide to hide the switcher on the excluded page:

Note: If you use the SquareSpace integration, this option if not available.

To exclude more URLs, click "Add Rule" and repeat the steps.

Note: Excluding a page does not automatically delete the translations already generated. To remove them, activate the "Delete translations linked to matching URLs" option in your exclusion rule.


b. Exclude URLs when deleting the translations

You can also exclude URLs when deleting the associated translations. Go to your Weglot dashboard > Projects > Translations > URLs.


Select the URLs to delete and click the "bin" icon.

Choose the option "Exclude URLs from translations" in the popup to prevent translations from being regenerated.

Choose the option "Delete associated translations, even if also displayed on other URLs" if you want to delete all the translations linked with this URL even if they are located on other URLs.

Once done, the Excluded URLs can be found in your Weglot Dashboard > Projects > Settings > Translations Exclusions.

Note: Weglot does not automatically remove translations related to excluded URLs. You'll need to choose the "Delete associated translations, even if also displayed on other URLs" option to remove the translations or remove them manually. For more details: How to permanently remove a translation?

2. Exclude blocks

a. Add Blocks Manually

To exclude a specific part of your website, go to your Weglot dashboard > Projects > Settings > Translation Exclusions > Excluded Blocks section.


Click on the "Add Rule" button.

Paste the CSS selector of the block you want to exclude in the "Blocks to exclude":

To find the CSS selector:

  1. Right-click on the element and select "Inspect" element.
  2. Use the arrow on the top left of the console to target the element you want to exclude.

  3. Right-click on the element, and select "Copy" > "Copy selector".

  4. Paste the selector in the "Blocks to exclude".

You can add multiple selectors. The content will not be translated into any language.

Note: Weglot does not automatically remove translations related to excluded blocks. You'll need to delete these translations manually. For more details: How to permanently remove a translation?

b. Use the Visual Block Exclusion (Beta)

You can also visually exclude blocks using the Visual Exclusion Tool. Go to your Weglot Dashboard > Projects > Settings > Translation exclusions > Excluded blocks section and click on the Visual Exclusion Tool icon.

You can easily select the block you want to exclude by clicking the "+" button next to it. It will automatically add the exclusion.

At the top of the Visual Exclusion Tool, you can choose from several icons to manage block exclusions. Click the pen icon to edit an exclusion, the bin icon to remove it, the "eye" button to locate the excluded block on the page, and the "+" icon to create a new exclusion rule.

3. Translations Rules

Translation rules do not exclude content from being translated but ensure specific words are translated in a certain way.


Go to your Weglot Dashboard > Projects > Translations > Glossary and click "Add glossary rule".

Specify the word or expression that should never be translated or should be customized. These rules will apply to new and automatic translations but will not affect manually edited translations. Please note there is a five-word maximum per rule. Click "Save" to apply. For more details, refer to: How can I create translation rules?

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us