Custom URL structure .com/product-category/product

#839188
  • Resolved Medialoods
    Rank Math free

    Hi guys, I currently have the following slug for my products:
    sitename.com/product-title

    However, we’re migrating to a different domain and want the following slug to be in place:
    sitename.com/product-category/productname

    I’ve tried just about everything but I can’t seem to figure this out.

    Migration is happening next monday and I’d love to figure this out before then.

    Kind regards,

    Leon

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello,

    I apologize for the issue you are facing with setting up a custom URL structure for your products during the migration to a different domain.

    To achieve the desired URL structure like sitename.com/product-category/productname, you can follow these steps:

    1. Set Up Permalinks in WordPress:

      • Go to your WordPress dashboard and navigate to Settings > Permalinks.
      • Choose the Custom Structure option and enter /product-category/%postname%/ in the field.
      • Save the changes.
    2. Update Product Permalinks:

      • Edit each product individually and ensure that the slug reflects the desired structure (product-category/productname).
    3. Redirects:

      • After migrating to the new domain, set up 301 redirects from the old URLs to the new ones to maintain SEO value and user experience.

    If you encounter any issues or need further assistance, please feel free to reach out. Thank you for bringing this to our attention.

    Kind regards,

    Rank Math Support Team

    Sources:
    WordPress Permalink Structure & Changing Individual URLs » Rank Math
    What Is a Slug in WordPress? » Rank Math
    Advanced Tab in Rank Math SEO’s Meta Box

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    The solution you provided is not working for me.

    Hello,

    Please also include the login URL of the site in the sensitive data section so we can check.

    Meanwhile, to show the product category on your slugs, head over to your WordPress dashboard > Settings > Permalinks > and set the Custom Base to /%product_cat%/ only

    custom

    Looking forward to helping you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    In the permalink settings, you have set the Product permalinks custom base as /%product-cat%/ instead of /%product_cat%/.

    We have made this change and the product permalink structure is set to .com/product-category/product

    Hope this helps and please don’t hesitate to let us know if you have any other questions.

    Thank you.

    I can see that the concurrent categories are not displayed within the slug. Is there any way to do this? So for example: domain.com/main-category/sub-category/product ?

    Hello,

    To achieve this you need to have the child category set as the default product category and both need to be selected like so:
    Category

    Don’t hesitate to get in touch if you have any other questions.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 8 replies - 1 through 8 (of 8 total)

The ticket ‘Custom URL structure .com/product-category/product’ is closed to new replies.