1

This has been going on for quite a while but I haven't had any solid proof until now.

Please search Google.com for "Princess Ivory Lace Tulle V Back Wedding Flower Girl Dress with Big Bow" and open up the first result:

https://www.princessly.com/ivory-lace-tulle-v-back-wedding-flower-girl-dress-with-big-bow-2664.html

(Forgive me for listing the URL prominently here as it facilitates understanding of the URL change)

Which is now a 404 not found error, a few days after the page was crawled by Google, when it was perfectly fine or Google wouldn't index the page in the first place.

Now when I do a catalog search, the exact product is now at a totally different URL:

https://www.princessly.com/ivory-lace-tulle-v-back-wedding-flower-girl-dress-with-big-bow-1.html

See the different integer at the end of the URL key.

This has also happened quite some times with product pins on Pinterest.com that the URL of a particular product somehow automatically changes this way and the Visit button of the pin leads also to a 404 not found page.

Apparently we never changed these URLs by ourself. Magento automatically changed them.

While I understand Magento has to append an integer of some sort to discriminate products with similar titles but why change it after it's been created?

Why? What could be the culprit here? How can we prevent it from doing this?

2 Answers 2

1

Apparently we never changed these URLs by ourself. Magento automatically changed them.

Of course this is caused because you have categories or products with duplicate urls, Magento appends these numbers to the end of your URLs because it actually already exists.

Magento will automatically append a 1 to a URL, and then continue to increment it. This makes the generation of those URLs dependent on system state when they were generated — there's no simple rule.

Note you can create your custom product url key when you create your product, like that magento will not going to generate them automatically via the product name.

For more informations: Alan Storm explanation

1

It seems Magento has a bug that keeps changing the ending digits of duplicate product URLs after catalog URL rewrites re-indexes or product category changes.

After some searches and a few days of testing I found this extension that fixed this issue for me: https://www.safemage.com/core-url-rewrites-optimization.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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