Feedback

What's your question? Be descriptive and concise.

By: Asked from United States of America

Duplicate URLs on a website a problem?

I built a website with classic ASP that has two types of URLs:

and

Will this be a problem for the site in terms of Google indexing content? Will Google incorrectly think I’m trying to “game” the system?

Add comment viewed 807 times Latest activity over 1 year ago

or Cancel

2 answers

  • 0

michaelcyger [ Admin ]

You don’t want Google or other search engines to ever think that there is duplicate information on your website. I can’t say for sure whether a search engine’s algorithm knows that /product/widget and /product/widget.asp are the same and will not penalize your website. No one knows except maybe Matt Cutts.


Your customer has some special coding that displays /widget.asp as /widget. Here’s what I’d do in this case:
1. Decide whether you want the website to use /widget.asp or /widget for all the pages. Make a rule. Write it down so you don’t forget.
2. Go through your entire website and find every case where the rule is not being followed. Fix every exception.
3. Create some sort of coding that can be included on every page (either Javascript or in ASP — you can have a small include file for every page, and just include it in the header) that redirects from whatever the “wrong” filename is to the “correct” filename.
4. Redo your site map or sitemap.xml (or whatever you’re using) and make sure that you only have the type of URLs that you want search engines to find.

With respect to #3 above, within ASP you can find out what the name of the page is that’s being displayed with something like this:
//determine page name
pagename = Request.ServerVariables(“SCRIPT_NAME”) 

//now process it if it’s the wrong kind
if inStr(pagename, “.asp”) > 0 then 
     newpagename = Left(pagename,Len(pagename)-4)
     response.redirect “http://www.domain.com/product/” & newpagename
end if


It’s been a long time (thank goodness) since I’ve coded in ASP so please check the syntax! :)
or Cancel