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 set up 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 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 Solutions Architect for your specific CNAME entry.
Top-Level Domain
DNS standards prohibit using CNAME records with top-level domains (ccTLD). There are two ways to resolve this if you want to use ccTLDs for your localized sites.
Option 1: Redirecting to a non ccTLD
- Set up a www domain (or similar) to receive traffic from your ccTLD
- Set up a redirect from your top-level domain to your www domain
- Send the traffic from your www domain to Smartling
It would look something like yourdomain.es -> redirect -> www.yourdomain.es -> proxy to GDN
Note that in this example, yourdomain.es will have to point to a specific IP address (A record). www.yourdomain.es will CNAME to client.sl.smartling.com (your "Smartling CNAME").
Redirects can be set up in your Content Delivery Network (CDN) or your web server if you are not using a CDN.
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]
Option 2: Using ALIAS
Some DNS providers offer a custom functionality which is usually called ALIAS. This functionality can set a “CNAME” on a root domain. Dyn and DNS Made Easy offer this feature.
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 Rule for Apache (with Mod_proxy)
HTTPS:
<VirtualHost REPLACETHISWITHIPADDRESS:443>
<Proxy "balancer://https_smartling">
BalancerMember "https://client.sl.smartling.com" keepalive=on disablereuse=On
</Proxy>
<Location /es>
ProxyPass balancer://https_smartling/es
ProxyPassReverse balancer://https_smartling/es
ProxyPreserveHost on
</Location>
</VirtualHost>
You will need to use both HTTP and HTTPS rules if your server accepts both
Sample Rules for nginx
http {
resolver dns_resolver_ip valid=60s ipv6=off;
}
server {
location ~* ^/(langfolder1|langfolder2|langfolder3)(/|$) {
set $sl_upstream $scheme://gdnclient.sl.smartling.com;
proxy_pass $sl_upstream;
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:
- Click Choose Optional Features > Configuration Attributes and Digital Properties.
- Select the Modify Path Rules option. A new section of the configuration is enabled.
- 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.
Headers and Cookies
In the same way as routing was done based on the subfolder in the URL above, it’s also possible to perform routing based on the value of a header or cookie, as long as the server performing the routing has that capability.