Can an "SEO Friendly" url contain a unique ID?
Asked Answered
D

12

42

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://example.com/products/details?id=1000

To:

http://example.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!

Danaus answered 4/5, 2009 at 15:3 Comment(3)
Your question assumes that SEO is measurably beneficial, which it is not.Klondike
Thanks for contributing an answer to Stack Overflow! Please make sure you answer the question; this is a Q&A site, not a discussion forum. Provide details and share your research. Avoid statements based solely on opinion; only make statements you can back up with an appropriate reference, or personal experiences.Pedro
its very amusing, in 2017, to look back on a comment that says "Your question assumes that SEO is measurably beneficial, which it is not". Oh boy, was it ever. In the last 8 years, people have made a lot of money from SEO being a huge commercial driver for success!Durango
R
75

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

I'd say you're fine.

Renunciation answered 4/5, 2009 at 15:5 Comment(3)
Although note you get extra SEO points for having the title in the URL but you can omit to read it when extracting the product, article, etc. I think it's not as much as having an unique ID that's bad than having a description of the page you're opening that's good.Prent
i think this url structure is not the best for SEO? why? because the SE is highly recommended with the keyword , not the article ID, that's mean you should place article title for the first position is better for SEO. EX: domain.com/article-title/idRemnant
@Remnant actually it's not recommended to place the id at the end, if it doesn't matter how your build your urls it does for your users to make them short and descriptive. So in this example the id should be considered as a folder and not as a file.Pokpoke
L
87

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

https://mcmap.net/q/381603/-can-an-quot-seo-friendly-quot-url-contain-a-unique-id

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: https://mcmap.net/q/381603/-can-an-quot-seo-friendly-quot-url-contain-a-unique-id 301 -> https://mcmap.net/q/381603/-can-an-quot-seo-friendly-quot-url-contain-a-unique-id

  • Use canonical URLs.

<link rel="canonical" href="https://mcmap.net/q/381603/-can-an-quot-seo-friendly-quot-url-contain-a-unique-id" />

Lipchitz answered 18/9, 2009 at 0:57 Comment(6)
this is great advice! This really answers the question I was asking in a question here today. Thanks!Adrenaline
Wouldn't it be ok to just stop after the ID in the canonical URI?Whyte
@Whyte stopping after the ID would lose the benefits of having keywords in the indexable URL.Oxidate
"matches your ID but doesn't match the text" the whole point of using an id is not to have to rely on the text. So looking to match the text doesn't make much sense.Perdue
"Black hats can this to cause duplicate content penalty for long tail competitors (trust me)." Do you have any sources on this?Watercool
@danihodovic: You can see why with a basic example: A competitor places a fake review on their site that points to your site with a mis-spelled product url. E.g.; they use href="www.site.com/products/koncrete-mixer/6868". Google then indexes this page and thinks it's duplicate content with your own link, "www.site.com/products/concrete-mixer/6868". No actual 'hacking' is required.Baldheaded
R
75

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

I'd say you're fine.

Renunciation answered 4/5, 2009 at 15:5 Comment(3)
Although note you get extra SEO points for having the title in the URL but you can omit to read it when extracting the product, article, etc. I think it's not as much as having an unique ID that's bad than having a description of the page you're opening that's good.Prent
i think this url structure is not the best for SEO? why? because the SE is highly recommended with the keyword , not the article ID, that's mean you should place article title for the first position is better for SEO. EX: domain.com/article-title/idRemnant
@Remnant actually it's not recommended to place the id at the end, if it doesn't matter how your build your urls it does for your users to make them short and descriptive. So in this example the id should be considered as a folder and not as a file.Pokpoke
B
15

Have a look at the URLs that StackOverflow uses. They have a unique id, then they have the SEO-friendly stuff. You can omit the SEO-friendly stuff and the URL still works.

Bodywork answered 4/5, 2009 at 15:5 Comment(0)
M
5

You are making a devils bargan here, you are trading away business goals for technology goals.

If you were to ask "From a purely business and SEO prospective, is it better to include unique IDs in the URL or not?"; the answer would clearly be to not use them.

The question then becomes, if you do use them, how much does it hurt you in the search engines? The answer is that it definately has some negative impact. How much is yet to be determined.

In terms of "user friendly", no, they are definitely not user friendly.

In terms of Google, they state "Whenever possible, shorten URLs by trimming unnecessary parameters." See their URL structure document.

Mcneely answered 4/5, 2009 at 15:12 Comment(4)
And how do you comment that all URLs submitted to Google News have to contain a numeric ID?Afire
With respect to Google News, I guess my answer is that Google is Google so they can do anything they want. In other words you need Google more than Google needs you. Google treats "Google News" as a special case with different routines than standard websites.Mcneely
If I can find more pertinent searches on Google as a result of meaningful SEO like shaping links, then that's a usability gain on the website -- technical enough in my book.Screwdriver
But if you dump the ID segment, you run the risk of having URLs like: #820993 and -2 and -3 and so on, which doesn't look professional.Horsemanship
A
4

I'm not aware of any problems caused by adding an ID to a URL. In fact it can be extremely useful, as it allows the human/search engine friendly part of the URL to be changed without causing a broken link to a page that a search engine has already indexed. Using SO as an example, here's a link to your question:

https://mcmap.net/q/381603/-can-an-quot-seo-friendly-quot-url-contain-a-unique-id

Astrology answered 4/5, 2009 at 15:46 Comment(0)
A
1

Nothing wrong with that. An increasing number of services have started to use a hybrid solution as Paul Tomblin already pointed out. In addition to SO, Tumblr uses this pattern too (maybe it was the first).

Furthermore, in certain services—like Google News—the URL must contain a unique numeric ID.

Afire answered 4/5, 2009 at 15:14 Comment(0)
B
1

Getting rid of the parameterized URL will definitely help. From my experience, including the ID does not hurt or help, as long as there are no '?key=value' pairs in the url.

Boult answered 4/5, 2009 at 15:15 Comment(0)
H
1

I have two seemingly contradictory points to make here:-

  1. Nobody looks at URLs! Experience has "trained" browser users to render the "Address" box contents as invisable, they know the contents will be any two of 'ureadable', 'meaningless' and 'confusing', hence they just ignore it completely.

  2. Using a String which can be easily converted to an integer may offer a slight performance advantage over using a longer string which is slightly harder (hash() vs. to_int() ) to convert into an integer. However in the context of the average web application any performance difference would would be negligable.

My advice would be to stick with what your comfortable with.

Headband answered 18/9, 2009 at 1:22 Comment(0)
A
0

Use something like modrewrite to parse URLs before they reach your server. So you could convert a slug like http://oorl.com/99942/My-Friendly-Text-For-Search-Engines/ into http://oorl.com/lookup.php?id=99942. This will also let you change slug and keywords used to optimize certain links without damaging functionality.

Alida answered 4/5, 2009 at 19:5 Comment(0)
G
0

Duplicate refer cause more negative impact compare to friendly URL, be careful about using fake text with id, your competitors could miss use this.

Gnostic answered 29/3, 2013 at 22:51 Comment(2)
you can always check it and 301 redirect. I save the friendly url string in the database and check if it's equal to the one provided, if not, I redirect to the one in the database.Cryotherapy
Absolutely, but performance should also be considered. It will be added to Render time that this issue has a negative effect on rankingsGnostic
C
0

A short url with slug is seo-friendly according to What is a slug and how to optimize it?.

And, the example url with slug and id below is seo-friendly enough. *If the url doesn't have id, it's more seo-friendly because it's shorter but I know that id is really useful to look up an object so no problem:

                 # ↓ "slug" ↓
http://myshop.com/orange-juice/id
                         # "id" ↑
Cardiac answered 12/5, 2023 at 0:32 Comment(0)
I
-1

Yes, and in fact it's more SEO friendly to include a number in your url as it implies to google that you are consistently updating your content.

I am fairly sure that it makes it much more difficult to get indexed in Google News if you don't have an incrementing number attached in some way to your URLs.

Imperil answered 18/9, 2009 at 1:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.