Rewrite friendly URLs using Custom ASP 404 error page - is it search engine safe?

Hi,
I'm using a custom 404 ASP error page to rewrite friendly-style URLs to standard asp ones, and I then use server.transfer to call the actual page.
eg. www.mysite.com/london.htm (which doesn't exist)
invisibly becomes
www.mysite.com/cities.asp?name=london (which does exist)
My question is this - is there any danger that search engines will recognise this as a 404 not found error and so not bother indexing it, or does server.transfer fully hide the fact?
Many thanks.
Nige
nigelhaylerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kevp75Commented:
I would imagine it would not be SEO.

The search engine will go to that page, and no matter how hard you try (unless you use a component), the initial headers that get sent to the browser is that of a 404 (page does not exist) error.  Which is exactly what the search engine will see.  That the page does not exist...
0
ophoCommented:
Hey nigelhayler...

My experience differs from kevp75's on this.

I'm using essentially the same technique you describe at this site:

http://www.purposeproject.org/FAQ

There is no page named FAQ.  My default.asp page is set up as my custom 404 page.  It looks at the database to determine where the content is for the page.  In the past I have retrieved the content and written it out with response.write statements directly from default.asp.  Currently, I am doing what you describe -- putting parm values in a couple of session variables and doing a server.transfer to the actual page.

I've tested using this SEO utility:

http://www.seoconsultants.com/tools/headers.asp

which tells me that the HTTP response is HTTP/1.1 200 OK

And, I'm not having any trouble getting placement in search engine results for this and another couple of client sites.

If anybody has specific experience or information that I'm reading my circumstances incorrectly, I'd love to hear about that.  But, I don't see any reason why you'd be running into problems with search engines based on what you've described.

--Steve
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nigelhaylerAuthor Commented:
Thanks kevp75 and Steve,
I wondered about all of this - a sudden chill went down my spine, having reworked my site to allow friendly URLs, when I thought what if the dreaded 404 gets through to the search engine? On the face of it, it does seem like it should, but I've just tried the utility you suggested Steve, and I get the same - 200 OK. Does this suggest that a custom 404 doesn't return 404 in the header at all? I wonder if anyone has used it, and found it does create a problem?
Nige
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

kevp75Commented:
personally i haven't even tried url re-writing  (other than with a component...)

It does seem like it should, however (if) Steve's pages are the custom 404 errors, I was able to spider them with no problem...so...looks like you should be good to go..
0
ophoCommented:
My understanding of custom error handling in IIS is that it is exactly that:  Instead of taking control over what should be done when a 404 error is triggered, IIS hands control over to the specified page.

When our ASP page takes control over redirecting to an actual page, we should still be generating our own 404 error if the requested content is not available.  We do that by writing out whatever we wish for page content and specifying our own status code.

For example, if the URL requested is obsolete because it's been replaced by a page at a new address, we should issue a 301 response as follows:

    Response.Status="301 Moved Permanently"
    Response.AddHeader "Location", "http://www.mydomain.com/NewPage.html"

This code redirects the browser to the correct page AND tells the browser as well as search bots that they should update their records to show the new address.

And, when a nonexistent page is requested, so we need to trigger a 404, we need to use:

    Response.Status="404 Moved Permanently"
    Response.Write [A page with the error message and links to the home page and site search page]

So, the answer to "a custom 404 doesn't return 404 in the header at all?" is "Exactly, unless we tell it to do so in our code."

--Steve
0
ophoCommented:
Ooops, obviously the second response.status should have been:

Response.Status="404 Not Found"

--Steve
0
nigelhaylerAuthor Commented:
Thanks Steve, that's something extra I'll bear in mind for a simple custom 404 Not Found page - to ensure the correct header is returned.

On the original question of friendly URL re-writes - I'm so glad I haven't wasted time today - I can pack up for the day happy! Thanks to you both.
0
kevp75Commented:
So, curiosity has a grip now....what happens when a client requests a page that does not exist?

Does the code on the custom 404 page send it into an endless loop, or would you simply setup some error checking?
0
ophoCommented:
Nope, IIS doesn't get involved again if the custom page sets the status to 404.
0
kevp75Commented:
ahh....good stuff to know...thanks opho
0
kevp75Commented:
p.s.   I'm just outside of Springfield, MA   ;-)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.