Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have developed a application and I need to work for SEO-friendly URL.

I have following URL structure:

http://localhost:3000/posts/product/testing-with-slug-url-2

and

http://localhost:3000/posts/product/testing-with-slug-url-2-4-23

Is this a good practice? If not how can I rewrite it?

Ok Ill explain about my applicaiton.

My application is based on shopping.

if a customer searched for mobiles. it will redirect to url like this

http://mydomain.com/cat/mobile-3

3 in the url indicates my database id it is used for further searching

After the user reached the mobile page he may need to filter for some brand eg. nokia so my url look lik

http://mydomain.com/subcat/nokia-3-2

The integer at the end refers to 3 category id and 2 the brand id

My doubt is whether the integer at the end of the url will affect seo ranking.

share|improve this question
1  
Please share your site architecture. –  Zistoloen Oct 14 '13 at 9:11
1  
What do try to explain with the second URL? are you rewriting your URLs or creating new ones? If so, in which way? –  I.G. Pascual Oct 14 '13 at 10:16
    
I have edited my question can you please check it –  overflow Oct 14 '13 at 11:23
    
Doesn't affect SEO but it seems to me that including the numerical ID in these URLs is completely redundant and the parsing of those strings will nearly negate any benefit you would've had from the increased speed of a purely numerical comparison (the ID lookup). Especially, the numbers for category ID because you are completely in control of that. My suggestion, ensure that your category table has a unique index on the title and use that alone for referencing them in urls. No one is going to be able to remember your ID #s so doing this makes HR URLs completely pointless. –  krowe Oct 15 '13 at 18:23

2 Answers 2

I doubt the integers will have an actual effect on your rankings.

If possible, I'd suggest to make the URLs have the same hierarchy as the logical hierarchy of your content, that is in your case:

http://mydomain.com/cat/mobile-3
http://mydomain.com/cat/mobile-3/nokia-2

A structure like that is transparent for the user as well as for search engines.

No one really knows whether this actually affects ranking, but the algorithms definitely won't blame you for transparency.

share|improve this answer
    
is this better mydomain.com/cat/mobile-nokia-3-2 ? –  overflow Oct 14 '13 at 16:00
1  
Yes, since mobile-3/nokia-2 implies it's a hierarchy. –  Ivo van der Veeken Oct 15 '13 at 14:16
    
Yes, the path should reflect the hierarchy. Imagine the path parts being a directory structure and the pages sorted in these directories (as it would be if you created your site just using static HTML) –  peterp Oct 17 '13 at 14:34

I would suggest that any ID numbers that are needed to figure out the page be placed near the beginning of the URL, rather than at the end. This is because long URLs have a tendency to be truncated in email and when pasted into forums and other content management systems.

http://localhost:3000/posts/product/testing-with-slu... cannot be understood by your web server but http://localhost:3000/posts/product/2-4-23-testing-wi... could be.

I wrote a good answer to are keywords in URLs good SEO or needlessly redundant? that covers this entire topic well and is worth your read.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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