I made a website that has a hierarchical structure and has search engine friendly (SEF) URLs like:
/seeds-1/
/seeds-1/fruits-2/
/seeds-1/fruits-2/black-berries-5/
/seeds-1/fruits-2/blue-berries-6/
/seeds-1/fruits-2/strawberries-7/
/seeds-1/vegetables-3/
/seeds-1/vegetables-3/potato-8/
/seeds-1/vegetables-3/onion-9/
/seeds-1/vegetables-3/cabbage-10/
/seeds-1/flowers-4/
/seeds-1/flowers-4/red-rose-11/
/seeds-1/flowers-4/tulips-12/
and so on. You'll notice that the numbers at the end are IDs. Now that I am done with the website and everything, a "consultant" intervenes and tells my client that "... urls are not 100% search engine friendly, to make them 100% search engine friendly, the numbers must be removed...". I obviously cannot talk to the "consultant" as they have done their job and disappeared.
I'll now appreciate if someone can point out the PROs and CONs for both types of URLs. I need some solid arguments to convince the client plus I really need to know if I've made a mistake choosing this kind of URL scheme for my website.
Edit ----
May be I am being lazy. The rewrite rules look like:
RewriteRule ^[^/]+-([0-9]+)/$ object.php?ObjectID=$1
RewriteRule ^[^/]+-([0-9]+)/[^/]+-([0-9]+)/$ object.php?ObjectID=$2
.
.
.
Its fairly easy to extract the ObjectID from query-string, cast it as an integer and use it in SQL query. I think using text comparison in queries (WHERE Name = '%s') is slower compared to using integer comparison (WHERE ObjectID = %d), therefore I am hesitating. The question is more like is it worth making the URLs more human-friendly at the cost of making them less coding/performance friendly.
Summary: yes you can have a numerical ID in your URL but you have to be careful with naming (if any), keep Google News in mind (if that matters), and realize that words carry more meaning than numbers.
Yes it is bad for SEO, as having keywords is better. The number wastes your SEO efforts. For Many Web enthusiasts or firms, the numbers are used because, they cant have their favourite or relevant domain names available.
Friendly URLs are called Aliases in Sitecore. The benefit of creating a friendly URL is that they are easier to remember and contain key words about the web page. Example: Original URL: https://portal.ct.gov/Services/Education/Higher-Education/Higher-Education-Information-and-Resources.
They must start with a letter, end with a letter or digit, and have as interior characters only letters, digits, and hyphen. There are also some restrictions on the length. Labels must be 63 characters or less.
Agree with cherouvim and will expand.
Two things to consider here -
Human friendly is one point...if your user wants to type in vegetables/onions/vidalia instead of vegatables/onions-10, then it obviously makes more sense to the end user.
Also, the search engine could also pick up on a little more detail as well...so a search for vidalia onion may yield a better ranking for your website.
In the end, the consultant is promoting the buzzword of readability. Yes its probably overall better in the long run (and should be as simple as writing a nice little .htaccess file to fix), but there's really nothing wrong with your setup.
Edit
Honestly, it really boils down to what your customer wants. As other users have also specified, there really isn't much of a performance difference in how you present the links...
What really matters now is if your client wants it presented. Do they care if this sort of information is readable by humans? If they're just going to take the consultant's advice then you might as well just implement your rewrite rules.
Searches for "seeds", "flowers", "vegetables" etc will match on the URL, so the URLs are good and engines will handle them nicely.
Whether you want to make them more human friendly is another issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With