3

I can´t verify my site on Google.

I´ve done this several times for several sites, all inside the same host.

I´ve tried the HTML tag method, HTML upload, Domain Name provider (I canp´t find the options that Google tell me that I should activate...), and Google Analytics.

I always get this response:

Verification failed for http://www.mysite.com/ using the Google Analytics method (1 minute ago). Your verification file returns a status of 403 (Forbidden) instead of 200 (OK).

I´ve checked the server headers, and I get this result:

  1. REQUESTING: http://www.mysite.com GET / HTTP/1.1 Connection: Keep-Alive Keep-Alive: 300 Accept:/ Host: www.mysite.com Accept-Language: en-us Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0)

SERVER RESPONSE: HTTP/1.1 403 Forbidden Date: Wed, 19 Sep 2012 03:25:22 GMT Server: Apache/2.2.19 (Unix) mod_ssl/2.2.19 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 PHP/5.2.17 Connection: close Content-Type: text/html; charset=iso-8859-1

Final Destination Page (It shows my actual homepage).

What can I do? The hosting is the very same as in my other sites, where I didn´t have any issue at all! Thanks for your help!

Note: As I have a Drupal 7 site, I´ve tried a "Drupal solution" first, but haven´t found any that solved this issue...

How can it be forbidden when I can access the link perfectly ok? Is there any solution to this? Thanks!

Almost forgot to add: I´ve checked my error logs:

173.194.98.19 - - [19/Sep/2012:00:35:33 -0300] "GET /google03h063571yf562bk.html HTTP/1.1" 403 - "-" "Google-Site-Verification/1.0"

181.25.218.223 - - [19/Sep/2012:00:35:45 -0300] "GET /google03h063571yf562bk.html HTTP/1.1" 200 53 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1"

7
  • 1
    Just to clarify... even when you request the homepage from the browser you get a 403? If there is a body to the response, as there appears to be ("Final Destination Page (It shows my actual homepage).") then you will see this regardless of the HTTP status code.
    – MrWhite
    Sep 19, 2012 at 8:17
  • Thanks for your reply. I don´t understand why is this happening. Is there anything I could do to avoid this? Could the server allow me to access the site and not allow the Google bot?
    – Rosamunda
    Sep 19, 2012 at 14:17
  • 1
    So, is the server returning a 403 status code when you visit the site? (I shall assume it is, since you say you've checked the headers.) A 403 in itself will not prevent you from seeing the page providing the page is still returned in the body of the response. However, unlike your browser, Googlebot will not look at the body of the response if the status code is 403. Without further information it looks like your server (website) is incorrectly returning a 403 status code in the response?!
    – MrWhite
    Sep 19, 2012 at 14:52
  • 1
    There will, no doubt, be a way to correct this, but without further information I have no more clues I'm afraid. Either your server, or Drupal, or something is resulting in the page returning a 403 rather than a 200 status code. Do you have a custom 403 page? TBH, if you are getting the normal webpage returned then I would have thought it's probably going to be something in the Drupal/PHP. Maybe Drupal Answers might be able to help?!
    – MrWhite
    Sep 19, 2012 at 20:58
  • 1
    Do you have a .htaccess file? If so, what does it say about your root directory where the verification file is? Is it possible that Drupal has rewrite rules that cover that request and direct it to a folder where a url like that is forbidden/has server security in place? I'd start with your .htaccess file if you do have one.
    – Nick
    Sep 24, 2012 at 17:59

2 Answers 2

3

Found the error: Some silly module (don´t know which one yet), added this code into my .htaccess file:

<Limit GET POST>
order deny,allow
allow from 24.232.0.0/16
allow from 66.60.0.0/18
allow from 129.214.0.0/16
allow from 140.191.0.0/16
allow from 157.92.0.0/16
allow from 161.190.0.0/16
allow from 163.10.0.0/16
allow from 167.252.0.0/16
[...]
allow from 209.99.224.0/20
allow from 216.244.192.0/18
deny from all
</Limit>

Eliminating that code did the trick. Posted this in case anyone encounters a similar problem. It's weird because it´s a new site, so it doesn't have many modules yet. I just installed the usual ones (like views).

0

Change the mode:

chmod 644 google03h063571yf562bk.html

when verifying with https

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.