Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Search engine friendly URLs that contain numbers... good or bad?

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.

like image 987
Salman A Avatar asked Feb 15 '10 08:02

Salman A


People also ask

Is it okay to have numbers in URL?

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.

Is having a number in the URL bad for SEO?

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.

What is a friendly URL example?

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.

Can URLs start with numbers?

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.


2 Answers

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.

like image 95
the_e Avatar answered Oct 01 '22 00:10

the_e


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.

like image 27
cherouvim Avatar answered Sep 30 '22 23:09

cherouvim