Solved

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

Posted on 2007-04-09
11
815 Views
Last Modified: 2013-12-08
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
0
Comment
Question by:nigelhayler
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
11 Comments
 
LVL 25

Expert Comment

by:kevp75
ID: 18876674
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
 
LVL 4

Accepted Solution

by:
opho earned 125 total points
ID: 18876861
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
 

Author Comment

by:nigelhayler
ID: 18877040
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
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 
LVL 25

Expert Comment

by:kevp75
ID: 18877164
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
 
LVL 4

Expert Comment

by:opho
ID: 18877511
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
 
LVL 4

Expert Comment

by:opho
ID: 18877745
Ooops, obviously the second response.status should have been:

Response.Status="404 Not Found"

--Steve
0
 

Author Comment

by:nigelhayler
ID: 18877809
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
 
LVL 25

Expert Comment

by:kevp75
ID: 18877981
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
 
LVL 4

Expert Comment

by:opho
ID: 18878148
Nope, IIS doesn't get involved again if the custom page sets the status to 404.
0
 
LVL 25

Expert Comment

by:kevp75
ID: 18878366
ahh....good stuff to know...thanks opho
0
 
LVL 25

Expert Comment

by:kevp75
ID: 18878373
p.s.   I'm just outside of Springfield, MA   ;-)
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question