Networking & Infrastructure

Localized DNS and Traffic Routing Setup

This article is for IT & Networking Specialists using the Global Delivery Network

Once you have selected your localize site strategy and configured your domains in Smartling, the final step to setup your localized site on the Smartling Global Delivery Network (GDN) is to point your translated domains or traffic to Smartling.

This article covers pointing traffic to Smartling via DNS records and web server/CDN tools:

DNS Records

For all GDN configurations except cookies/language headers, you will need to configure CNAME settings. Depending on the hosting service you are using, configuration may vary slightly.

While your changes will appear in the nameservers within minutes, please be aware that it can take up to 72-hours for new records to propagate to all nameservers on the internet. If you have trouble adding your CNAME record, contact your domain host directly for further assistance.

Subdomain

Smartling uses CNAME DNS records to direct localized traffic to the correct servers in the GDN infrastructure. For subdomains, this requires you to create a CNAME entry for each localized subdomain in your DNS records. Contact your Customer Success Manager for your specific CNAME entry.

Top Level Domain

DNS specifications do not allow CNAME records to be used with top-level domain records, so you cannot use top level domains with the Smartling GDN directly. For example: mysite.fr cannot be used directly. You will need to follow these steps in order to point a Top Level Domain (TLD) to Smartling:

  1. Set up a website on your server to handle requests to the ccTLD, for example: smartlinghotels.fr.
  2. Modify your DNS settings for smartlinghotels.fr to create an “A” record for the TLD that points to your new site.
  3. Add a CNAME record that points to the Smartling site (www.smartlinghotels.fr)
  4. Set up your website for smartlinghotels.fr to permanently redirect all traffic to www.smartlinghotels.fr

For Apache servers you can add an .htaccess file with the following content into the root folder of your site:

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^mysite.fr [nc]
rewriterule ^(.\*)$ http://www.mysite.fr/$1 [r=301,nc]

Subfolders (HTTP Server with Proxy Capabilities)

An HTTP server with proxy capabilities (Apache, Nginx) has the ability to split traffic to Smartling for translated folders and to another location for source content.

Apache requires installation of the mod_proxy module to use the ProxyPass directive.

Sample Rules for Apache (with Mod_proxy)

HTTP:

<VirtualHost REPLACEWITHIPADDRESS:80>
    ServerName domain.com
    ServerAlias www.domain.com

    <Proxy http://mycompany.sl.smartling.com/\*>
        Allow from all
    </Proxy>

    <LocationMatch "/langfolder1">
        ProxyPass http://mycompany.sl.smartling.com/LANGUAGEFOLDER
        ProxyPassReverse http://mycompany.sl.smartling.com/LANGUAGEFOLDER
        ProxyPreserveHost On
    </LocationMatch>
</VirtualHost>

HTTPS:

<VirtualHost REPLACETHISWITHIPADDRESS:443>
	ServerName domain.com
	ServerAlias www.domain.com
	SSLEngine on #required_for_ssl
	SSLProxyEngine on #required_for_ssl

	<Proxy https://mycompany.sl.smartling.com/\*>
		Allow from all
	</Proxy>

	<LocationMatch "/FIRSTLANGUAGEFOLDER">
		 ProxyPass https://mycompany.sl.smartling.com/FIRSTLANGUAGEFOLDER
		 ProxyPassReverse https://mycompany.sl.smartling.com/FIRSTLANGUAGEFOLDER
		 ProxyPreserveHost On
	</LocationMatch>
	
	<LocationMatch "/SECONDLANGUAGEFOLDER">
		 ProxyPass https://mycompany.sl.smartling.com/SECONDLANGUAGEFOLDER
		 ProxyPassReverse https://mycompany.sl.smartling.com/SECONDLANGUAGEFOLDER
		 ProxyPreserveHost On
	</LocationMatch>
</VirtualHost>

You will need to use both HTTP and HTTPS rules if your server accepts both

Sample Rules for nginx

location ~\* ^/(langfolder1|langfolder2|langfolder3)/?
{break;proxy_pass http://.sl.smartling.com; proxy_set_header Host $host;}

For all other web servers and appliances, contact the company’s technical support team.

SSL Implications: If encryption is required, the certificates are deployed on your server. Traffic between the proxy and Smartling is encrypted using unsigned certificates, so certificates will not be needed on the Smartling proxies.

Subfolders Through a Content Delivery Network

A CDN is a proxy solution that also lets you split traffic between different origin hosts for the content that is optimized for delivery. In this configuration, rules are set up in the CDN configuration to split traffic to Smartling instead of the regular origin host.

Akamai:

  1. Click Choose Optional Features > Configuration Attributes and Digital Properties.
  2. Select the Modify Path Rules option. A new section of the configuration is enabled.
  3. Modify path rule / Match Criteria / Component Path: /FOLDERNAME/ (Ignore Case):
    Relative (Remove Original Path): /FOLDERNAME/
    Modified Origin Server: mycompany.sl.smartling.com
    Forward HOST header: Digital Property
    Cache Key: Origin Server (mycompany.sl.smartling.com)

Other CDNs (CloudFlare, Limelight, Fastly, ChinaCache, etc): Contact your CDN provider.

SSL Implications: If encryption is required, the certificates are deployed in the CDN infrastructure. Traffic between the CDN and Smartling is encrypted using unsigned certificates, therefore no certificates will be needed in the GDN.

Test Your Configuration

Once you have completed all setup steps above, you can verify your connection for a translated site: 

  1. From within your GDN project in Smartling, select Global Delivery Network > Domains.
  2. Click the globe icon for the source domain that requires translated site configuration.
  3. Click the > arrow next to a translated domain (subdomains are setup by default).
  4. Click Edit Localized Domain.
  5. Click Verify DNS.

Do not click this button if you are using Smartling generated temporary localized domains. This will cause them to stop functioning)

Your localized domain should turn from white text to blue text in your domains tab.

If your site does not verify, or you get a "Domain Not Configured" message when you visit your localized domains, check the following:

  • Subdomain, TLD/ccTLD: From the command line run a nslookup on your translated domain. The canonical name value should match the CNAME value in the localized domain settings. This is your Smartling CNAME and should be in a format such as [yourcompany].sl.smartling.com. If you do not see your Smartling CNAME in the canonical name value, you have not configured your DNS settings properly.
  • Folders: Verify you have used an appliance with proxy capabilities to send traffic to Smartling, not a redirect function. Also, verify you have set the value in the Host Header to your source domain.

If you still see a "Domain Not Configured" message, contact [email protected]

Was this article helpful?