Forum Moderators: open
I am trying to get the Google Translate tool to translate my site but whenever I try it, I get the message:
Sorry, we are unable to access the page you requested:
http://www.example.co.uk/index.html
It used to say "Server Error" but now it's saying it can't access the page.
Is it something to do with my htaccess file do you think? Or perhaps robots.txt?
Any help would be much appreciated,
Cheers,
Jon.
[edited by: eelixduppy at 6:51 pm (utc) on May 2, 2009]
[edit reason] exemplified [/edit]
That would depend entirely on what is in your robots.txt and .htaccess file...
Can you provide any further information about what access controls you have implemented?
The Google Translate referrals I've seen come from two IP address ranges, 64.233.0.0-64.233.255.255 and 209.85.128.0-209.85.255.255, and the "page" /translate_c. So the HTTP referrer string looks something like
http://64.233.10.213/translate_c?hl=de&te=de&...
where "..." is a whole bunch more query parameters.
If you've got code in your .htaccess file that blocks access based on the HTTP Referer header, then make sure it won't block referrers resembling that.
Jim
[edited by: jdMorgan at 1:33 pm (utc) on May 2, 2009]
I've tried wiping both my htaccess file and robots.txt file but am still having the same problem. The strange thing is, those IP's appear in my top 5 referral URLs!
21290.94%http://64.233.169.132/translate_c
31110.81%http://bbs.dospy.com/viewthread.php
4880.64%http://72.14.203.132/translate_c
5540.39%http://64.233.189.132/translate_c
My htaccess file looks like this:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.example.co.uk/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.example.co.uk$ [NC]
RewriteCond %{HTTP_REFERER} !^http://example.co.uk/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://example.co.uk$ [NC]
RewriteRule .*\.(jpg¦jpeg¦gif¦png¦bmp¦swf)$ http://www.example.co.uk/images/nohotlink.jpe [R,NC]
AddType application/x-httpd-php .html .htm
AddType application/x-httpd-php .xml
and robots only disallows agents to view a couple of pages on the server that I use for data entry.
The other strange thing is that other translating sites, MSN, Yahoo, work fine...
[edited by: eelixduppy at 6:53 pm (utc) on May 2, 2009]
[edit reason] exemplified [/edit]
Do check for HTML coding errors on your page though, and be sure that the DOCTYPE line is the first in the document (for example, make sure there's no spurious blank line ahead of it.)
You can re-code/simplify your .htaccess for somewhat better performance with no change to function:
RewriteEngine on
#
RewriteCond %{HTTP_REFERER} !^(http://(www\.)?example\.co\.uk/.*)?$ [NC]
RewriteCond %{REQUEST_URI} !^nohotlink\.
RewriteRule \.(jpe?g¦gif¦png¦bmp¦swf)$ http://www.example.co.uk/images/nohotlink.jpe [NC,R=302,L]
Important: Replace the borken pipe "¦" characters here with solid pipe characters before use; Posting onthis forum modifies the pipe characters.
You should also look into canonicalizing URLs and hostnames on your server. For example, all of the following 15 URLs return your home page, present duplicate content, and thus "compete" with each other for links, "recognition/branding," and ranking:
example.co.uk/
example.co.uk./
example.co.uk:80/
example.co.uk.:80/
www.example.co.uk./
www.example.co.uk:80/
www.example.co.uk.:80/
example.co.uk/index.html
example.co.uk./index.html
example.co.uk:80/index.html
example.co.uk.:80/index.html
www.example.co.uk/index.html
www.example.co.uk./index.html
www.example.co.uk:80/index.html
www.example.co.uk.:80/index.html
All should be 301-redirected to the canonical "www.example.co.uk/" URL. Doing so would also simplify your anti-hotlinking code, since only the one canonical hostname would then be a valid referrer.
Unfortunately, I doubt that anything I posted here will result in a solution, but correcting any DOCTYPE problems and fixing errors in your HTML *might* help.
There is also the possibility that your host has blocked Google's access to your server at the firewall level. Some hosts do this in a badly-conceived attempt to reduce their network traffic. You could try a translation yourself, and see if the server error log file indicate any problems, or ask your host if they firewall Google translation requests (or any others Google requests).
Jim