Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

cPath underscores and SEO


motorcity

Recommended Posts

I heard somewhere that underscores in the url are considered bad form for search engines. Here's one example discussion; http://www.ecreativeim.com/blog/2011/03/seo-basics-hyphen-or-underscore-for-seo-urls/

The only place I find underscores in my url's is in the cpath

 

hffp://example.con/x15/index.php?cPath=3_15

 

I can't find any discussion on the subject around here. Can anyone shed some light on this?

 

I believe this is where the '_' comes from in catalog/includes/functions/general.php

// Generate a path to categories
function tep_get_path($current_category_id = '') {
global $cPath_array;
if (tep_not_null($current_category_id)) {
 $cp_size = sizeof($cPath_array);
 if ($cp_size == 0) {
 $cPath_new = $current_category_id;
 } else {
 $cPath_new = '';
 $last_category_query = tep_db_query("select parent_id from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$cPath_array[($cp_size-1)] . "'");
 $last_category = tep_db_fetch_array($last_category_query);
 $current_category_query = tep_db_query("select parent_id from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
 $current_category = tep_db_fetch_array($current_category_query);
 if ($last_category['parent_id'] == $current_category['parent_id']) {
	 for ($i=0; $i<($cp_size-1); $i++) {
	 $cPath_new .= '_' . $cPath_array[$i];
	 }
 } else {
	 for ($i=0; $i<$cp_size; $i++) {
	 $cPath_new .= '_' . $cPath_array[$i];
	 }
 }
 $cPath_new .= '_' . $current_category_id;
 if (substr($cPath_new, 0, 1) == '_') {
	 $cPath_new = substr($cPath_new, 1);
 }
 }
} else {
 $cPath_new = implode('_', $cPath_array);
}
return 'cPath=' . $cPath_new;
}
////

Link to comment
Share on other sites

Install one of the SEO URL mods that use .htaccess rewrites.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

I heard somewhere that underscores in the url are considered bad form for search engines.

Yes, that is true but only for keywords. The seach engines will not pay any attention to the numbers for ranking purposes.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

So Jack, by that do you mean it shouldn't be a concern?

I can't imagine it is a big deal unless its something new with Google.

Otherwise I think I wouldn't be the first person to bring it up. -That I seem to be able to find...

Link to comment
Share on other sites

Nothing to worry about, if you're talking about URL Query String entries like cPath=3_15. The search engine spider can still get to the appropriate place in your store. It's not going to even try indexing that cPath.

 

"Search Engine Friendly" URLs are much overrated. They have very little, if any, impact on search engine rankings. Don't sweat it. These days, the only real reason for doing SEF URLs is so they look cleaner and neater to humans (who aren't likely to be typing them in, anyway).

Link to comment
Share on other sites

So Jack, by that do you mean it shouldn't be a concern?

I can't imagine it is a big deal unless its something new with Google.

Otherwise I think I wouldn't be the first person to bring it up. -That I seem to be able to find...

It's not a new thing. SEO people have known about it for years. But it only applies to relevant parts of the url, which is the text. So given a url with domain.com/some_words_123.php, the some_words is what's important and, in that case, should be written as some-words. But I mostly agree with Phil on this. Years ago, when url rewriting was first being done, it did help with the search engines because they had a hard time figuring out the basic urls at the time. They can handle them now so the importance of rewritten url's doesn't matter as much. Having the keywords in the url will still help but it is much less that previously.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...