: Changing CMS and URLs I'm migrating a busy web-shop (10'000 IPs/day) to OpenCart, manually copying all the products, tags, descriptions and architecture. The old website was not built following
I'm migrating a busy web-shop (10'000 IPs/day) to OpenCart, manually copying all the products, tags, descriptions and architecture.
The old website was not built following semantics standards, no h1 tags, alt tags are not filled, etc.
In the new website this is fixed. The text content doesn't change much.
The issue: The URLs on the current website look like this:
www.example.com/Some-Category-p/Product-Name.htm
The old CMS added the -p to all of the categories. On the new website, the links look like this:
www.example.com/Some-Category/Product-Name.htm
What steps (perhaps some checklist) should I take, not to be penalized by Google once I update to OpenCart and re-register the sitemap?
More posts by @Goswami781
2 Comments
Sorted by latest first Latest Oldest Best
Just to add to Yhorian's answer... it's relatively trivial to implement such a redirect. For example, if using Apache's mod_rewrite in .htaccess then it's essentially a one-liner. Something like:
RewriteEngine On
RewriteRule ^([w-]+)-p/(.*) // [R=301,L]
This specifically works on a URL of the form /Some-Category-p/Product-Name.htm. The regex might need to be adjusted depending on the URL structure.
The ([w-]+) part captures "Some-Category" and (.*) captures "Product-Name.htm" (everything after the first slash). These are then available in the and backreferences respectively, which is reassembled in the substitution (//).
Take each of the URLs and add them as 301 (permanent) redirects to the new URLs.
So accessing Some-Category-p/Product-Name.htm redirects to /Some-Category/Product-Name.htm with a 301 code.
There's 3 reasons for this:
Maintains parity with links.
Google will eventually rewrite with the new URL but while it doesn't, the old one will still work.
It should be standard practice when you're moving content to new URLs. This will be good practice!
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.