• Hello,

    Around 6 months ago I changed permalink structure to remove catergory base for products. However old URLs are still crawled but are not present in the sitemap. An example is below:

    Old URL which you can still view and is still being crawled but not in sitemap:
    /shop/baby/bajo-fish-rattle/

    Nerw URL which is in sitemap and also being crawled
    /bajo-fish-rattle/

    Any suggestions please? Rather than redicrecting every single product on my website individually. It looks like when i changed the URL structure in wordpress settings it has duplicated pages?

    Thank you

    Stuart

    • This topic was modified 4 years, 4 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    No pages are duplicated. Different URLs just return the same page. The canonical URL in both cases is the correct URL, so there really isn’t any problem. Old URLs can remain out in the wild and in Google’s crawl cache for very long periods of time. Ideally you’d want to 301 redirect the old URLs to the new to help extinguish old URLs in Google and in the wild.

    If the URL changes all involve the removal of “shop/baby/” and that string does not occur in any other desirable URL, adding a single 301 redirect rule to cover every old URL is relatively simple, it does not need to done individually for every product. .htaccess redirect rules support regular expressions, which are sort of like wildcard matching on steroids. You can have rule that is essentially “for any URL like “shop/baby/*”, 301 redirect to “*”. Any value matching “*” is used in the redirect.

    This is a very pedestrian example, regular expressions can be much more sophisticated. As long as the needed change is consistent throughout the URLs, there will be a regular expression to handle it.

    Thread Starter stuart2020

    (@stuart2020)

    That’s great, thanks so much for the reply!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Old URL remain and are crawled after changing permalink structure’ is closed to new replies.