How do I set up my DNS?
In this article, you will learn how to set up your DNS in order to configure your subdomain or your subdirectory integration with Weglot
- What kind of integrations are available?
- How to set up a subdomain integration?
- How to set up a subdirectory integration?
- How to verify if everything is correctly setup?
1. What kind of integrations are available?
With the subdomain-based and subdirectory-based integrations, your translations are made server-side on a dedicated URL. For example, if your website is translated into English, you can have the following:
- Subdomain https://en.website.com/
- Or subdirectory https://www.website.com/en/
These integrations are equivalent in terms of SEO, as it allows Google to index your translated pages.
More info here 👉 How does Weglot manage the SEO
2. How to set up a subdomain integration?
You are trying to set up (a) subdomain(s) for your translated pages, and you have trouble setting up your DNS? No worries, it's easier than it looks
First, log in to your Weglot Dashboard
You should see this:
On this page, you can indicate the owner of the project, the project name, and the website technology.
Then, you arrive on this page, where you can indicate your languages:
After clicking on "Next", this page appears:
Here, you just need to enter the URL of your domain. You should also choose the type of URL you would like to have (subdomains or subdirectories). To have a URL using the subdomains for your translated versions, you should choose "Subdomains".
Then, click on "Next"
Add your DNS entry into your domain registrar
You should now see this step:
At this step, you should be able to edit the subdomain name by clicking on the "en" name.
Then you can customize your subdomain name.
Into your domain registrar, you have to go to your domain settings and you have to set up DNS.
Your domain registrar should be where you're paying in order to manage your main domain (for instance > yourwebsite.com)
You'll have to create the DNS record below (if French is your translated language)
host > en
CNAME
point to > number_and_letters.translate-cf.weglot.io (instead of websites.weglot.com in the example above)
If you are using GoDaddy, Google Domains, Namecheap, or Hostinger you can see how to do it in the videos below:
GoDaddy -->> https://www.youtube.com/watch?v=9407vj9pXbY
Google Domains -->> https://www.youtube.com/watch?v=t0vbawaPUN4
Namecheap -->> https://www.youtube.com/watch?v=syC5EGllqrs
Hostinger -->> https://www.youtube.com/watch?v=j7aPlUQtNCk
Once this step is done, the red cross should become green after a few seconds or minutes:
Then, click on "Next"
If you have any trouble, you can contact us at support@weglot.com and provide us access to your domain registrar, we can add the DNS entry for you.
Wait for the subdomain(s) initialization
Here, Weglot is initializing your subdomain(s) and you just have to wait a little bit until you see the message "Domain ready":
Meanwhile, feel free to follow the instructions and add the JavaScript code snippet right before your closing head tag, it will display the language switcher on your website, and also add hreflang tags to let Google know you have different versions of the same page and favor indexing of these pages (which is important for your SEO)
Once it's done, you can click on "Next" and you're done! You can now visit the pages on your subdomain(s) in order to generate your translations
3. How to set up a subdirectory integration?
You are trying to set up (a) subdirectory(ies) for your translated pages, and you have trouble setting up your DNS? No worries, it's easier than it looks
First, log in to your Weglot Dashboard
You should see this:
On this page, you can indicate the owner of the project, the project name, and the website technology.
Then, you arrive on this page, where you can indicate your languages:
After clicking on "Next", this page appears:
Here, you just need to enter the URL of your domain. You should also choose the type of URL you would like to have (subdomains or subdirectories). To have a URL using the subdirectories for your translated versions, you should choose "Subdirectories (Beta)".
Then, click on "Next"
Add your DNS entry into your domain registrar
You should now see this step:
Into your domain registrar, you have to go to your domain settings, and you have to set up DNS.
Your domain registrar should be where you're paying in order to manage your main domain (for instance > yourwebsite.com)
You'll have to create the DNS record displayed on your Weglot dashboard (the values are specific for each project)
host > cloudflare-verify
TXT
point to > value with numbers and letters
Once this step is done, the red cross should become green after a few seconds or minutes:
You should see that the SSL certificate is validated. This means that the first step has been completed.
Then, you should replace an existing DNS. You should look for a CNAME (that can be another type) record with the name displayed on your Weglot dashboard, and you should change its value to set it to the new value indicated on your Weglot dashboard. This value should have the pattern below:
number_and_letters.translate-cf.weglot.io
The propagation of the DNS may take a few minutes. Once done, you should see feedback indicating that you succeeded in setting up your subdirectories.
Then, click on "Finish".
If you have any trouble, you can contact us at support@weglot.com and provide us access to your domain registrar, we can add the DNS entry for you.
4. How to verify if everything is correctly setup?
Once you set up your DNS to use the subdomains-based integration or the subdirectories-based integration, you can check if they are set up correctly.
To do so, on your Setup Page, you should look for the information under "Subdomains / Subdirectories".
If your Subdomains or Subdirectories are correctly setup, you should see "Online" next to the status of your website.
Using the Subdomains-based integration, you should see
Using the Subdomains-based integration, you should see:
If you have any trouble, you can contact us at support@weglot.com and provide us access to your domain registrar, we can add the DNS entry for you.
Have any feedback on this article? Let us know!