Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Best for SEO at root - index.html, index.php or redirect?


Recommended Posts

Posted

My isp requires the cart be in it's own folder so I've been placing a index.html copy of the storefront (cut and paste 'View Source' code from the cart's index.php) there. Recently I've replaced it with a index.php at the root, with the contents:

 

<?php 
echo file_get_contents ('http://mysite.com/catalog/index.php'); 
?>

 

Just wondering from a SEO standpoint, between the two methods above and a redirect, which of the three is best to use when it's not possible to have your cart at the site root. I know redirects aren't ideal but I'm not sure if either of the index methods are consider by search engines to be duplicate pages.

Posted

I've never seen file_get_contents used for that purpose before but I suspect it is not good. The best solution would be to switch to a real host, of course, but short of that, use an .htaccess file or header command to do the redirect. Be sure to return a 301.

 

Jack

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

Posted

Moving the site to the root will lower the index posiiton of whichever pages are currently indexed. You would need to add a 301 redirect for those pages and the rankings should recover in a few weeks.

 

Jack

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

Posted

Thank you for your answers and sorry, one more question. Would I need to place a redirect file for each individual product/page to it's new location? If so, is there a quick method of implementing 301s on all of the pages?

  • 1 year later...
Posted
This should do it for you:
Redirect permanent /catalog http://www.yourdomain.com/

 

Jack

 

Where is this code placed?

In the htaccess?

TIA

  • 1 year later...
Posted

Talk about resurrecting a post!! That's what happens when we use "Search" before posting lol.

 

Anyway, I'm about to do just that: move the store from /store/catalog to the root and, at the same time, launch a brand new OSC store to replace the older one.

 

Not only will pages have moved, but there might not even be a 1-to-1 relationship between old-new pages. Hundreds of pages are currently indexed by google.

 

What would the 301 redirect code be in order to redirect all customers from any /store/catalog pages to my homepage?

From an SEO point of view, would this 'bulk' redirect be acceptable? I don't have time to set up hundreds of individual 301 redirects for all pages!

 

Thank you very much!

Archived

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

×
×
  • Create New...