Forum Moderators: phranque
[view all mens t-shirts]
http://www.example.net/mens/t-shirts/
[view all mens t-shirts in category 23]
http://www.example.net/mens/t-shirts/23/
[view mens product_id 1234 in category 23]
http://www.example.net/mens/t-shirts/23/1234/
---
What i want to ask is, will they complete with one another for search engine ranking? Will below be a better solution?
[view all mens t-shirts]
http://www.example.net/mens/t-shirts/
[view all mens t-shirts in category 23]
http://www.example.net/c23/
[view mens product_id 1234 in category 23]
http://www.example.net/p1234/
If you want the best results, then drop all "c" and "p" URLs, and use actual product and category names in the URLs, "t-shirts", "clothing", and "brand" and "size" and "color" and "subject-of-shirt-logo" etc.
However, this approach requires that all top-category URLs (example "mens") be rewritten to a script that can figure out what the category and product id should be for each "word" in the URL, and it requires that you absolutely avoid ever creating two URLs with the exact same words in them. In other words, it requires a change to your script to use 'words' to look up products in your database instead of "c" and "p" numbers, and it requires the addition of a 'front-end' to your database management that can check existing URLs and prevent you from creating duplicates in the database.
It is critically important to take a lot of time to 'design' a new URL-architecture that will be flexible enough to fit your site both today and five years from today, and that will prevent the duplication of URLs by being specific enough. You'll need to name categories and products hierarchically and in accordance with 'exactly and specifically what they are' and not take any short-cuts.
These modifications don't necessarily mean that you have to modify your cart script(s) and/or other scripts that will likely need to be updated and up-graded over time (e.g. to improve security), requiring you to re-modify all of these scripts every time one is patched. It may be possible --and much more maintainable-- to put a 'wrapper script' around your cart. That is, incoming requests for "mens" URLs are rewritten to the 'wrapper' script, which then looks up the cid and pid using the category, specific product name, etc. given in the requested URL, and then "includes" (php "require" directive) your cart script, passing it the same cid and pid numbers that you used to have in your URLs. It's a big project, and not one that can be accomplished based only on forum posts, but it's not an insurmountable one...
Jim
I did my own research and discover some shopping cart website do indeed use catalog and product name in URL. They do help in SEO alot. Is just like wordpress whereby your post is (my-post-name.html) rather than (?p=234).
I wanted to do as per your advice when design my URL rewrite system last month but the HARD part is actually using name to represent into $c and $p. In the end i ditch the idea of using catalog n product name.
Now that you also think as I do, perhaps, I will look into this issue again and see what I can do to archive use of name instead of numbers.
Do you get content, a 301 or 302 redirect to add the slash, or an "Error 404, Not found" error message? ]
i get "301 Moved Permanently" then add " / " get "200 OK" (with content NO 404)
---
http://example.net/shop/mens/t-shirts/rubbish-enter-here
above URL lead to 404 Not found and display content of my custom 404.php
*I design my URL system with respect to Apple website. Apple website also behave like that for " / " and 404 pages. (i hope apple website URL system is a good example!)
===
i had this lines on top of my htaccess
#Add a trailing slash to requested URLs
RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_URI} !example.php
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ http://www.example.net/$1/ [L,R=301]
I also posted the logic required to prevent 301-400 chains in that other thread.
Let's keep the focus in this thread on the SEO aspects of the proposed URL-scheme, and the other thread focused on coding. Otherwise, I will be tempted to lock this thread or to merge it with the other one in the interest of maintaining continuity and reducing redundant posts.
Thanks,
Jim
I have a rough idea how to execute as per your advice. However, I also understand that this is a BIG modification as we are talking about replace category ID and numerous product ID with English words and none of them must duplicate.
My question is Do you think is worthwhile to make such changes? I did my own SEO part of URL rewrite already but do I need to go so further into details into perfection? Is this going to propel my website like 10-20 position higher in search ranking?
How often does an online shopper search a clothing by product name in search engine?
eg t-shirt name: 'Abyss Gazes Also Into You' ¦ 'Mental Spaghetti'
Compare to a more generic search eg. 'mens t-shirts'
My point is, even of I did my URL design by product name and category name, i think more shopper will search by generic names rather than name of product. I say this because my category and product names is 'I create those names on my own' and they are not widely-media advertised.
I certainly can't guess how many 'ranking positions' such a change would give you. It might be that putting the 'real category names' in the URLs would be a huge benefit, but that no such gain would result by putting the product names in the URLs. Or maybe it wouldn't help even the categories' rankings much -- There's no way for me to predict this based on my very-limited knowledge of your site. So this is a decision that only you can make, based on your knowledge of your site and your customers and your product-types.
You could also do a 'test run' without too much risk, if you added a new category and used the "real-category-name-in-URL" method.
If you did decide to make this URL-format change, it would be possible to avoid duplicating category and product names by leaving some or all of the product or category id numbers in the URL -- all the way at the end or the URL. But there are a million ways to do this, with arguments for and against each --mostly from posters who know very little about your site, but still insist that their way is best because it works on their site, and that's why I stay out of the SEO forums here, for the most part... :)
Jim
That i totally agree with you to leave some form of category id in the URL. I really can't imagine in another 1-2 years time, my e-commerce website maybe add another 30+ category brands, causing my htaccess to be long, if i do not have some form of generic format(-catID) in my URL eg. .../categoryBrand-catID/