views:

177

answers:

3

I wrote a site using ASP.NET MVC, and although it is not completely SEO optimized at this point I figured it is a good start. What I'm finding is that when I use Google's Webmaster Tools to fetch my site (to see what a GoogleBot sees) it sees this.

HTTP/1.1 200 OK
Cache-Control: public, max-age=1148
Content-Type: application/xhtml+xml; charset=utf-8
Expires: Mon, 18 Jan 2010 18:47:35 GMT
Last-Modified: Mon, 18 Jan 2010 17:07:35 GMT
Vary: *
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 2.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Mon, 18 Jan 2010 18:28:26 GMT
Content-Length: 254

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"&gt;
  <head>
<title>
  Index
</title>
  </head>
  <body>
  </body>
</html>

Obviously this is not what my site looks like. I have no clue where Google is getting that HTML from. Anybody have an answer and a solution? Anybody experience the same issues?

Thanks in advance.

+1  A: 

Do you have any of these files in the root folder?

  • index.htm
  • index.html
  • default.htm
  • default.html

It looks like it may be grabbing one of those instead. If that doesn't help you may need to post the html of your home page.

37Stars
I definitely don't have any of those files in my root folder. I posted a link to my site above click on "My Site Looks Like".
Khalid Abuhakmeh
+1  A: 

Your content-type seems off.

Mine is:

Content-Type: text/html; charset=utf-8

If that doesn't work (which I think it should), try turning off caching.

(SIDE NOTE: Check out this: Removing HTTP Headers)

Martin
+2  A: 

You can use the User Agent Switcher plugin for Firefox to make a request much like GoogleBot would. https://addons.mozilla.org/en-US/firefox/addon/59

I tried it and your site looks fine. I would contact Google to see if it's a problem on their end.

Haacked
Thanks Mr. Haack,I later found out that the problem wasn't isolated to Google but internet explorer as well. I still don't understand where the view was coming from, it was really strange.I think it was my hosting. I don't know exactly what the problem was but once I moved to another host the problem cleared up. I was using an instance on the MobileCapableViewEngine and a LocalizationViewEngine.On my previous host (the bad one), when I got rid of the Mobile aspect, It would work fine.Thank you again for responding.
Khalid Abuhakmeh