I've designed my own 'latest news' page for my site - and I'm trying to keep the URL's clean.

(eg) It should look like this :

http://www.domain.com/21/this-is-a-clean-url/

When someone links to the article, they sometimes mess it up and do :

http://www.domain.com/21/this-is-a-clean-url/#random-hash-tag

So what I have been doing is looking for "http://www.domain.com/21" and 301 (moved permantly) redirecting to the proper url + adding a canonical meta tag for it.

Is this going overboard?

Should I instead be using a (302 Found) header - and just let the canonical tag tell search engines what the proper URL for the article is?

What is the best way of handling this?

link|improve this question
feedback

1 Answer

User agents don't send the fragment (i.e. what's after the #) to the server, so you can't actually detect this. In any case, I'm pretty sure that search engines understand what the fragment is and don't consider it a different URL.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.