Jump to content

<SOLVED> How to keep Google ranking when switching from one's site to Prestashop ?


Recommended Posts

Hello to all,
I currently run an e-commerce, which has a pretty good ranking for the products I sell, niche products. I regularly come first on the products I sell on Gg.
If I plan to switch to Prestashop, is there a way for me not to lose these rankings, or would they be lost from the minute I change the page URL -provided of course that I keep the same root address, but change the page directory config ?
Thanks for your remarks

Best regards, Fred

Link to comment
Share on other sites

remember that if you have different URL's for the new site compared to the current site these will be broken

Look into 301 redirects on the internet

Also, submit a siteMap when you go live and make sure your site is optimised for you keywords

You can never guarantee how the search engines will see the new site (there are 100's of measures search engines use) but you can make sure you take steps to help them understand what your about

Link to comment
Share on other sites

  • 3 months later...

Hello Dave and all,

I finally launched my new site (hurried by the closing of former one), but I couldn't retrive the old links I had using the 301 redirects, I guess I must be doing it wrong.

I used to have a shop where the URL's structure was something like:
http://terresdaperitifs.com/boutique/fiche_produit.cfm?ref=gold_strike&num=41&type=5&code_lg=lg_fr

Not really friendly, is it ?

I've put my new shop running under Prestashop (v1.1 running on a OVH shared server), with URL friendly, and I want the same address to redirect to
http://terresdaperitifs.com/boutique/liqueurs-de-degustation/180-gold-strike-bols-50d.html

Therefore on my .htaccess under the www/ directory, I've inserted a redirect instruction;

SetEnv PHP_VER 5
SetEnv REGISTER_GLOBALS 0
RewriteBase / 
# URL rewriting module activation
RewriteEngine on
RewriteBase /boutique/
# URL rewriting rules
RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$2$4 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$1$3 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ category.php?id_category=$1 [QSA,L,E]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ supplier.php?id_supplier=$1$3 [QSA,L,E]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ cms.php?id_cms=$1 [QSA,L,E]

RewriteRule ^/boutique/fiche_produit.cfm?ref=gold_strike&num=41&type=5&code_lg=lg_fr$ http://terresdaperitifs.com/boutique/liqueurs-de-degustation/180-gold-strike-bols-50d.html [R=301,NC]

# Catch 404 errors
ErrorDocument 404 /boutique/404.php



Guess what, it forwards me to the 404 page (of prestashop).

Would you have any idea ?

Thanks in advance

Fred

Link to comment
Share on other sites

Hi ilian2001,

It doesn't work because of the '?' in the URLs, in fact the '?' and what follows is called a query string and
must be handled differently.

Try :
RewriteRule ^/boutique/fiche_produit\.cfm?ref=gold_strike&num=41&type=5&code_lg=lg_fr$ http://terresdaperitifs.com/boutique/liqueurs-de-degustation/180-gold-strike-bols-50d.html? [R=301,L]

Or you can use RewriteCond %{QUERY_STRING} but it's longer.

Link to comment
Share on other sites

Dear Misty,
thank you, though it's still not working.
Should I put this htaccess under the root folder, or the /boutique/ ?
Then, are you sure about the "/" and the question mark after the redirection ?

I've got about 100 redirections to type, so do you think this is a reasonable choice to write them all in the htaccess ?

That's a lot of questions, thank you in advance.
Best regards
Fred

Link to comment
Share on other sites

Hi Ilian2001,

If URL rewriting is working that means your .htaccess is at the right place.
About the "/" you mean the "\" ? you have to escape some characters like "." in left expressions.
You can safely put as many as 100 redirections in your file, I was in the same situation as you
3 months ago except my site has more than 3000 URLs and it's working fine, it's a temporary situation
and my site is fast enough.
=> Don't wait, use the quickest method because the more you wait, the more you loose ranks in google and others.


So you have to use QUERY_STRING, it's 2 lines for each URL containing a '?' you want to redirect :

RewriteCond %{QUERY_STRING} ^ref=gold_strike&num=41&type=5&code_lg=lg_fr$
RewriteRule ^/boutique/fiche_produit\.cfm$ http://terresdaperitifs.com/boutique/liqueurs-de-degustation/180-gold-strike-bols-50d.html? [R=301,L]

The "?" at the end is to discard "ref=gold_strike&num=41&type=5&code_lg=lg_fr", if you don't put the "?" It will append it to your new
URL, which is not what you want.

There is a small tutorial here if you want :
http://www.simonecarletti.com/blog/2009/01/apache-rewriterule-and-query-string/

Link to comment
Share on other sites

Oh and BTW I found that :
http://www.terresdaperitifs.com/boutique/
is not redirected to
http://terresdaperitifs.com/boutique/

I think you chose not to have the www anymore, so be very careful to redirect 301 or
you will have each URL twice, which is very bad for Google.

If you have a Google Webmaster Tools account, I advise you to specify if you want www.terresdaperitifs.com or terresdaperitifs.com in Paramètres / Domaine Favori, don't forget to specify "Zone géographique ciblée" to France if you want to optimise for google.fr

Link to comment
Share on other sites

Dear Misty,
I'm really grateful that you tried and help me, but....it still does not work.
There must be some obvious stupid little detail I can't understand somewhere.
Here attached my htaccess of the www/boutique/ folder (I've copied the same on the www root folder).

SetEnv PHP_VER 5
SetEnv REGISTER_GLOBALS 0
RewriteBase /

# URL rewriting module activation
RewriteEngine on


RewriteBase /boutique/
# URL rewriting rules

RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$2$4 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$1$3 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ category.php?id_category=$1 [QSA,L,E]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ supplier.php?id_supplier=$1$3 [QSA,L,E]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ cms.php?id_cms=$1 [QSA,L,E]

RewriteCond %{QUERY_STRING} ^ref=gold_strike&num=41&type=5&code_lg=lg_fr$
RewriteRule ^/boutique/fiche_produit\.cfm$ http://www.terresdaperitifs.com/boutique/liqueurs-de-degustation/180-gold-strike-bols-50d.html? [R=301,L]

# Catch 404 errors
ErrorDocument 404 /boutique/404.php



I thought there might be an order, and tried different configurations, this made no difference.

And thank you also for your www advise, I changed it on my index.php.

Best regards
Fred

Link to comment
Share on other sites

I just had a look to my .htaccess to see what's wrong with yours.
First thing is you can't start with '/' in ReWriteRule (starting with '/' is for Redirect directive, not RewriteRule,
I messed up because I have both ReWriteRule and Redirect in my htaccess).

So it could be :
RewriteRule ^fiche_produit\.cfm$ http://www.terresdaperitifs.com/boutique/liqueurs-de-degustation/180-gold-strike-bols-50d.html? [R=301,L]

Maybe it will still not work because of "http://www.terresdaperitifs.com", in my htaccess I put that only in Redirect, not RewriteRule.

  • Like 1
Link to comment
Share on other sites

Vu les horaires de réponse, (2:48AM), je m'étais imaginé un généreux australien en bottes de croco. Passe un jour nous voir (rue d'Auteuil, attention, c'est le grand ouest).

Je viens par ailleurs de me rendre compte que Gg ou mon ancien prestataire avait indexé les adresses avec des variables dans un ordre parfois différent (genre ref puis lg puis num) de ce que c'était sur le site... Grrrrr, ça double le boulot.

Link to comment
Share on other sites

J'essaierai de passer vous voir, vous avez des produits très sympas :)

Concernant tes URLs indexées, je te conseille pour les traquer la commande google suivante :
site:terresdaperitifs.com

J'attire ton attention sur le fait que par exemple :
http://terresdaperitifs.com/boutique/liqueurs-de-degustation/180-gold-strike-bols-50d.html
http://www.terresdaperitifs.com/boutique/liqueurs-de-degustation/180-gold-strike-bols-50d.html
fonctionnent tous les deux.

Aussi tout ton site se retrouve en double, c'est très pénalisant pour le référencement.
Il faut absolument que tous les www redirigent vers la version non www, puisque c'est ce que
tu sembles avoir choisi pour la nouvelle version de ton site (personnellement j'aurai gardé le www,
c'est déjà difficile une migration, si en plus on migre de domaine c'est encore plus dur :P ).

Link to comment
Share on other sites

Et si je ne voulais garder que www ? J'ai inséré dans mon htaccess (qui n'en est plus à ça près)

RewriteCond %{HTTP_HOST} ^terresdaperitifs.com[QSA,L,E]
RewriteRule ^(.*) http://www.terresdaperitifs.com/$1 [L,R=301]



mais ça ne semble pas suffire

Link to comment
Share on other sites

  • 2 years later...
×
×
  • Create New...