1

I'm trying to get my head on this, our site have thousands of links, is an e-commerce site, where products titles require changes on regular basis to get the best of SEO... you know, as usual, we build the url from the product title cleaning all weird characters and to make it seo friendly url.

However, all the pages are dynamically generated, means, if someone of the data content team changes the title name of that product url will change, which mean:

  • if the old url has a good position on SERP that page will be lost? meaning we lose the SEO, ranking...
  • How we keep the same page SERP position?
  • Does it needs a redirect or rewrite?
  • If it's a redirect do we need 2 pages? page A as old link and page B with new Link? don't think so?
  • so then the sitemap needs to contain the 2 url?
  • what is the best practise for dynamic url change?
1

If the product URL changes you do need to 301 redirect the previous URL to the new one in order to maintain the SEO ranking of the product page. Or you need to keep the product page on the same URL.

Here is a way to do this. When the product URL changes from example.com/previousURL to example.com/newURL, do a file_put_contents previousURL.txt. Put example.com/newURL into previousURL.txt

When someone goes to example.com/previousurl , do a $newurl = file_get_contents('previousURL.txt'), if { the number of characters in that file is > 0 { header location = $newurl 301, true }}

In other words, whenever a person goes to a product page, the page will check to see if the URL has been changed. If the URL has been changed, it will 301 redirect to the new URL. And whenever a product URL changes, it logs the previous URL so that the previous page will redirect to the new one.

  • Is this the only method? because, we don't use php, is all typescript with angular4 as IIS .net – jcdsr Feb 16 '18 at 12:25
  • URLs are Dynamic, creating a file for every old url seems not good an idea. – jcdsr Jun 11 '18 at 10:23

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.