Subdirectory publishing is when the translated languages are in a subdirectory, like /fr/ for French. This page is intended for system administrators tasked with setting it up. It requires a Content Delivery Network (CDN) such as CloudFront or CloudFlare.
CloudFront or CloudFlare?
Choosing between the two options can be difficult as they provide very similar features. You can find a few guidelines below:
- If your website uses a naked domain, like
example.comas opposed towww.example.com, select CloudFlare because CloudFront doesn't support this. - If your domain is already managed by CloudFlare, select CloudFlare.
- Otherwise, select CloudFront.
Set up CloudFront
There are multiple steps to set MP Express up with CloudFront.
First, MP Express will provide a piece of HTML code. You'll need to add it to your website by editing your template. The exact process depends on your system. Please refer to their documentation or reach out to us. We may be able to help you out.
Second, your domain's DNS settings need to be edited. MP Express will provide three DNS records. Please add them to your DNS settings. These records are used to verify that you own the domain. As a side effect, the Google Domain Verification process will provide access for proxytranslation@gmail.com to Google Search Console and an e-mail notification will be sent out to other Search Console users. This doesn't change your website yet.
Once the DNS records are added and verified, the next step is to push the translations live. This involves further DNS edits. Your existing records pointing to your own servers need to be removed so that new ones provided by MP Express can be installed. These settings ensure that the website traffic is going through MP Express and as such, the translations are in place as configured.
Set up CloudFlare
With CloudFlare, Workers are used to handle the traffic and route visitors to the appropriate language website. Make sure that CloudFlare's Rocket Loader is disabled. Setting it up is as follows.
First, just like with CloudFront, MP Express will provide a piece of HTML code. You'll need to add it to your website by editing your template. The exact process depends on your system. Please refer to their documentation or reach out to us. We may be able to help you out.
Then, MP Express will provide you with JavaScript code designed to work with CloudFlare Workers. You need to copy it and paste it into a new Service that you had created. Once you save, you'll be able to test the system by navigating to the staging URL that CloudFlare provides on workers.dev. Navigate to the subfolder and verify that the translated website loads.
Finally, navigate to Triggers, and add a route. Enter the domain of the website, like *.example.com/*. Note that only routes of hostnames configured on CloudFlare can be specified, so if your domain isn't yet configured, you must do so via the Add site button in the top bar. Once you set this up, you'll be able to view the translated site on your own domain.
Comments
0 comments
Please sign in to leave a comment.