Skip to main content

technical blog

Go Search
Home
Technical Blog
Resumé
Travel
Skydiving
Contact
  
Random Image

chrishines.com > technical blog > Categories
Google Sitemap submission
You may have read in my review of Sitefinity that I wrote a bolt-on to generate a Google Site Map every time the website is republished....

Today I went to submit my site map to Google and Google rejected my submission. After some investigation I found it was because my custom 404 page was returning a Status Code of "200 OK", when things were not ok ;-) Google identifies this as a "security risk" and require that you rectify the problem before they will verify your site and accept your site map.

I use DiscountASP.net shared hosting so do not have full control over IIS, I just have a useful but limited web-based Control Panel. The Control Panel does allow me to set any page on my site as a custom 404 error page. So what I did was set my error page to be an ASPX file in which I put the code:

Response.Status = "404 Not Found";

Google were then happy to verify my site and let me submit my site map. Job done.