Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://example.com/">here</a>.</p>
<hr>
<address>Apache Server at www.example.com Port 80</address>
</body></html>

What is the problem ?

share|improve this question
    
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). –  bybe 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)? –  w3d May 17 '13 at 8:19
    
the website is fine when i access it via the browser –  Rachid O. 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.) –  w3d May 17 '13 at 10:27
add comment

1 Answer 1

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.
share|improve this answer
    
when i did the command that you mentioned i got the whole page's html code in response –  Rachid O. 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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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