I launched a website four days ago, and now when I try to crawl the website like Google bot in "Google webmaster tools" I end up with a response like this:

HTTP/1.1 301 Moved Permanently
Date: Thu, 16 May 2013 21:37:26 GMT
Server: Apache
Location: http://example.com/
Content-Length: 294
Keep-Alive: timeout=10, max=29
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1

<title>301 Moved Permanently</title>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://example.com/">here</a>.</p>
<address>Apache Server at www.example.com Port 80</address>

What is the problem ?

  • It could be many reasons, please edit your question and include the htaccess file, httpd.conf if you have one, as well as enabled-sites (again only if you have this). – Simon Hayter May 17 '13 at 0:07
  • Are you seeing the same redirect with a normal browser request? Have you set GWT up for www.example.com, but your site is actually located at (and redirecting to) example.com (without the www subdomain)? – MrWhite May 17 '13 at 8:19
  • the website is fine when i access it via the browser – Rachid Oussanaa May 17 '13 at 9:17
  • Can you just confirm that you aren't getting a redirect in an ordinary browser request, for the same URL? The reason being that if you got the above response in a normal browser, it would still be "fine". (You need to look at the HTTP traffic in the browsers developer tools.) – MrWhite May 17 '13 at 10:27

To further investigate this problem you should:

  • Look at your server log files. Find the requests from Googlebot and verify that they are resulting in 301 status. If you direct Googlebot to hit your server and there is no request in the server log, then you have a DNS problem. Your domain name is not pointing to the server that you think it is pointing to.
  • Download pages from your site yourself similarly to the way Googlebot does so. I use a command line program called "curl": curl -D - -s -A 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)' http://mysite.example.com/ Verify that you get back the same response that Googlebot is getting.
  • when i did the command that you mentioned i got the whole page's html code in response – Rachid Oussanaa May 17 '13 at 21:44
  • And what about the server logs? Can you see Googlebot actually hitting your site? – Stephen Ostermiller May 17 '13 at 23:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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