WordPress uses SEO-friendly URLs and automatically adds the parent page slug to child page URLs. While this often makes sense, we prefer to have more control over our permalink structure here at WPBeginner rather than just accept the default settings.
Whether you’re aiming for cleaner URLs or want to simplify your site navigation, removing the parent page slug from your child page URLs can be a helpful customization.
In this article, we will show you how to remove the parent page slug from a child page URL in WordPress, allowing you to make your URLs shorter and simpler.
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 WordPress site. 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 drop-down navigation menu to show that other pages belong under that page.
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.
Now you can see your page’s current default URL in the permalink field. 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.
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
We hope this article helped you learn how to remove the parent page slug from a child page URL in WordPress. You may want to learn more about pages and child pages in WordPress:
- How to Create a Child Page in WordPress
- How to Display a List of Child Pages for a Parent Page in WordPress
- How to Better Manage WordPress Pages with Nested Pages
- How to Create a Landing Page with 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.
Kristy Bernardo
I’ve searched everywhere for an answer to this question – finally found it! THANK YOU.
WPBeginner Support
Glad our guide could help
Admin
THANKGOD JONATHAN
You have said it all and I will also not recommend changing the Wordpress default permalink structure for parent slug. As it is best for both User Experience and SEO.
Ralph
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.
WPBeginner Support
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
Moinuddin Waheed
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.
WPBeginner Support
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
Ahmed Omar
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.
Jiří Vaněk
And how will the Google Search Console react if I do this with already indexed URLs? Will it have any negative impact on SEO?
WPBeginner Support
You would want to redirect the URLs and Search Console would update to the new location over time.
Admin
Jiří Vaněk
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.
Vinay
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?
WPBeginner Support
You would want to ensure you clear any caching on your site and ensure your redirect is set up properly
Admin
Chad
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).
RK
This plugin has a conflict with a cornerstone page. Does not work with cornerstone pages.
RS_lyly2009
Awesome post.
Is there any other way to change the url without installing the plugin?
Thanks you!
Qasim Yad
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