Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
362 views
in Technique[技术] by (71.8m points)

Can an "SEO Friendly" url contain a unique ID?

I'd like to start using "SEO Friendly Urls" but the notion of generating and looking up large, unique text "ids" seems to be a significant performance challenge relative to simply looking up by an integer. Now, I know this isn't as "human friendly", but if I switched from

http://mysite.com/products/details?id=1000

to

http://mysite.com/products/spacelysprokets/sproket/id

I could still use the ID alone to quickly lookup the details, but the URL itself contains keywords that will display in that detail. Is that friendly enough for Google? I hope so as it seems a much easier process than generating something at the end that is both unique and meaningful.

Thanks!

James

question from:https://stackoverflow.com/questions/820493/can-an-seo-friendly-url-contain-a-unique-id

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Be careful with allowing a page to render using the same method as Stack overflow.

http://stackoverflow.com/questions/820493/random-text-can-cause-problems

Black hats can this to cause duplicate content penalty for long tail competitors (trust me).

Here are two things you can do to protect yourself from this.

  • HTTP 301 redirect any inbound display url that matches your ID but doesn't match the text to the correct text.

Example: http://stackoverflow.com/questions/820493/random-text-can-cause-problems 301 -> http://stackoverflow.com/questions/820493/can-an-seo-friendly-url-contain-a-unique-id

  • Use canonical URLs.

<link rel="canonical" href="http://stackoverflow.com/questions/820493/can-an-seo-friendly-url-contain-a-unique-id" />


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...