Global Translator (now abandoned by the developer) is a WordPress Plugin that allows you to translate your blog posts and pages in 48 different languages.

But, if you have uninstalled the plugin and are now seeing lots of 404 Not Found Errors in Google Webmaster Tools for translated page URLs, then lets check out in this post how to fix them?



Using .htaccess file

You can 301 redirect all translated page URLs to their original URL using a .htaccess file. The redirect will be valid for both search engines as well as for your visitors using any type of web browser. Follow these steps in order to create a redirect:

1. Log in to your cPanel account directly OR by means of a FTP Program.

2. Now, locate the .htaccess file of your WordPress installation. If you have installed the CMS for your primary domain, then the .htaccess file for your installation will be present in /public_html/ folder in File Manager. In case you are unable to locate the .htaccess file, try opening a support ticket with your webhost.

3. Make a backup of your current .htaccess file by downloading and saving it onto your hard drive – Very Important.

4. We are now ready to edit the .htaccess file. At the end of the file, you will see # END WordPress written. Copy and Paste following lines just after it::

RedirectMatch 301 /pt/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /fr/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /it/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /ko/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /zh-CN/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /zh-CW/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /en/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /de/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /es/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /ja/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /ar/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /ru/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /el/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /nl/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /zh/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /zt/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /no/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /bg/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /cs/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /hr/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /da/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /fi/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /hi/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /pl/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /ro/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /sv/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /ca/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /tl/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /iw/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /id/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /lv/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /lt/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /sr/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /sk/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /sl/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /uk/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /vi/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /sq/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /et/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /gl/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /mt/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /th/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /tr/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /hu/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /be/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /ga/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /is/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /mk/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /ms/(.*)$ http://www.yoursite.com/$1
RedirectMatch 301 /fa/(.*)$ http://www.yoursite.com/$1

global translator plugin

5. Save the file and it’s all done. Access any URL of a translated page and it will get redirected to its original WordPress permalink. For example, when you access http://yoursite.com/fr/abcxyz/, it will always get redirected to http://yoursite.com/abcxyz/.

Important Notes:

  • It is very essential to backup your .htaccess file before making above changes. If you experience any browser error when you revisit your blog, then you are required to re-upload the original .htaccess file.
  • Replace http://www.yoursite.com with exact URL of your Domain Name. If your blog URL don’t have www in it, then there’s no need to enter it.
  • If you are using some other TLD like .net.org etc., then you are required to replace .com above.
  • I have tried my best to include all the languages supported by this plugin above. In case I have missed any language, then feel free to leave a comment below.

Using robots.txt

You can block search engine bots from crawling translated page URLs using a robots.txt file. Follow these steps in order to do so:

1. Login to your host control panel either directly or by means of a FTP Program.

2. Locate the robots.txt file in the root directory of your WordPress Installation. In case there’s no robots.txt file in the root, then you can create one using a text editor like Notepad, Notepad++ etc.

3. Make a Backup of your current robots.txt file by downloading and saving it onto your Hard Drive.

4. Now, include following lines in your robots.txt file:

User-agent: Googlebot

Disallow: /pt/

Disallow: /fr/

Disallow: /it/

Disallow: /ko/

Disallow: /<Enter all other remaining languages>/

 

User-agent: *

Disallow: /pt/

Disallow: /fr/

Disallow: /it/

Disallow: /ko/

Disallow: /<Enter all other remaining languages>/

5. Save the file and it’s all done.