Beginner's Guide for WordPress / Start your WordPress Blog in minutes

How to Remove Parent Slug From Child Page URL in WordPress

Are you wondering how to remove the parent page slug from a child page URL in WordPress?

By default, WordPress adds the parent page’s slug as a prefix to child page URLs, and this is good for SEO. However, some people may not want the parent page slug in the URL.

In this article, we will show you how to remove the parent page slug from a child page URL in WordPress.

How to Remove Parent Slug From Child Page URL in WordPress

What Is a Parent Page Slug in WordPress?

Your WordPress website comes with two main content types called posts and pages.

Pages are hierarchical, which means they can have child pages. These child pages are dependent on their parent pages and typically cover subtopics related to the parent.

For example, you might have a ‘Products’ parent page with ‘Pricing’, ‘Support’, and ‘Features’ child pages.

By default, the URL of a child page in WordPress will have its parent page’s slug in the URL. Here’s an example:

http://example.com/parent-page/child-page/

Using URLs like this is the best way to organize content within a hierarchical page structure on your website. These URLs are considered best practice for WordPress SEO and will make sense to your users when they read them.

It’s usually not a good idea to remove the parent page slug. It can potentially break the URL, and some experts believe it is less SEO-friendly. Sometimes, it may even cause conflicts with the WordPress permalink structure.

In our experience, if you don’t want a parent page slug in your child page URL, then the best approach is to not create a child page at all. Instead, you can simply create a normal page and use a navigation menu to show that other pages belong under that page.

Adding Child Items to a Menu

However, we understand that some users may still want to use child pages and not include the parent page slug within the URL.

That being said, let’s take a look at how to easily remove the parent page slug from a child page URL in WordPress.

Removing Parent Page Slug From Child Page URL in WordPress

The first thing you need to do is install and activate the Custom Permalinks plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, you need to edit the child page that you want to change. Under the content area, you will see a ‘Custom Permalinks’ field where you can change the child page URL.

Change child page URL

The permalink field will show your page’s current default URL. You just need to click it and enter the custom URL you want to use for your child page.

In our example, the hollywood-boulevarde page is a child page oflocations, so the default permalink is locations/hollywood-boulevarde.

We deleted the locations parent slug from the URL, as you can see in the screenshot below.

Custom page URL

Don’t forget to click the ‘Update’ button to save your page and store your URL changes.

After saving your changes, the plugin will automatically redirect the old permalink to the new address. This means your visitors will not see a 404 error if they click a link or bookmark to the page’s old address.

When you view the child page, you will now notice that its URL does not contain the parent slug.

Our Best Guides on Pages and Child Pages

Now that you know how to customize a child page’s URL in WordPress, you may want to learn more about how to use pages and child pages in WordPress:

We hope this article helped you learn how to remove the parent page slug from a child page URL in WordPress. You may also want to see our guide on how to create a custom page in WordPress or our expert picks for the best drag and drop page builder plugins for WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

15 CommentsLeave a Reply

  1. Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. I think parent page in url can be useful. I don’t have them on my own website however, when I surf the web i often don’t see a button or menu to go from post to category, so i just delete child url, and can browse parent page. I agree it is more personal than functional, but can be helpful.

    • It certainly can be helpful to have them but it is more a question of personal preference for the website owner and the type of content on the site :)

      Admin

  3. Does it really matter which slug is in the url?
    I mean in terms of search engine optimisation and page visibility in the Google search bots.
    many times we do find it difficult to decide which domain name to get for our blog.
    is it really an search engine optimisation concern for the domain…
    does it matter or we can just purchase any of the domain and start writing our blog content?
    thanks for the nice article about the slug.

    • It is a question of personal preference more than a requirement. Some sites want to remove the parent slug for how the content is structured.

      Admin

  4. personally I find the parent page in the URL could be useful, as the visitor may just delete the child URL and reach to the parent page where he can find more posts or pages.
    personally I am doing this when I browse sites.

  5. And how will the Google Search Console react if I do this with already indexed URLs? Will it have any negative impact on SEO?

    • You would want to redirect the URLs and Search Console would update to the new location over time.

      Admin

      • Ok thanks for your answer. I have a lot of articles on my website and I want to make some changes to the URLs. So, these pieces of advice are very helpful.

  6. I have changed my page url from education to education-information. But when I click on that page.. it is showing the old page with a message page not found 404 error.. and when click on the page for 2nd time it is going to the concerned page. what should I do?

    • You would want to ensure you clear any caching on your site and ensure your redirect is set up properly

      Admin

  7. What about 301 redirects? I recommend setting up these redirects if you update URLs (Google might have indexed the old version of the URL or users may have saved those links).

  8. Awesome post.
    Is there any other way to change the url without installing the plugin?
    Thanks you!

  9. Awesome! I was looking for this technique for ages. I would really love if you could share any approach other than using a plugin.

    But, still i love this technique. Thanks

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.