
You look at the address bar and see something like jouwdomein.nl/?p=123, or you want to make the URL of a single page look neater but are worried that you'll break links. In WordPress, you can customize a permalink on two levels: site-wide via Settings > Permalinks and for each page or post via the slug in the editor, and every time you make a change to an existing page, a 301 redirect should be set up from the old URL to the new one. I’ll show you the structure I recommend, how to change a slug, and how to prevent 404 errors.
What makes a URL SEO-friendly?
An SEO-friendly URL is short, readable, and describes what the page is about in just a few words. Compare jouwdomein.nl/?p=123 with jouwdomein.nl/wordpress-onderhoud/. With the second one, a visitor can immediately see what to expect, and a search engine gets an additional cue about the topic. The URL isn’t a magic bullet for your rankings, but a cluttered URL is clicked on less often and shared less frequently.
Let’s go over the terms briefly, since they tend to get mixed up in practice. The permalink is the full, fixed address of a page. The slug is the last part of that address—the part you enter yourself for each page. The permalink structure is the site-wide rule that determines how WordPress builds those addresses.
A good slug is written in lowercase letters, with hyphens between words and no punctuation. Omit articles and filler words such as “the,” “it,” “a,” and “for” if the slug remains readable without them. Include the page’s main keyword, but don’t repeat it. I don’t recommend including dates in the URL for most sites. An article from 2023 with that year in the URL looks outdated, even if you updated it just last month.
Setting Up the Permalink Structure
For virtually every site, Message Name the correct permalink structure, which turns the address into jouwdomein.nl/paginanaam/. You can select it under Settings > Permalinks. The other options are Simple, Day and Name, Month and Name, Numeric, and a custom structure with tags such as %category% and %postname%. A structure that includes the category can be useful for a large news site, but then the URL changes as soon as you move a post to a different category. For a company website, blog, or online store, “Post Name” is the simplest solution.
Then click on Save changes. WordPress then writes the rewrite rules needed to make the clean URLs work on a LiteSpeed or Apache server in the file .htaccess. You can read about what's in that file and what rules you can add to it yourself in the WordPress .htaccess file. At the bottom of the screen, you can also set a category base and tag base, such as /topic/ instead of /category/. This is handy, but it also changes existing URLs.
My opinion on this is clear. If an existing site has been using a different structure for years and traffic is flowing well, leave it as is. The benefits of a more elegant structure rarely outweigh the risk of hundreds of redirects all at once. On a new site, set it up correctly from the start, along with the other basic settings. Configuring WordPress Settings.
Changing the slug of a single page or post
You can edit the slug for a single page or post in the editor, in the settings panel on the right. Open the page, click the current address in the "Link" or "URL" section of the panel, and type a new slug. In the overview under "Pages" or "Posts," you can also do this by Quick Edit, which is handy if you want to go through several of them. Categories and tags also have a slug, which you can edit under Posts > Categories.
Now for the important part. If the page has already been published, the old URL still exists in places you can’t see—such as search results, links from other websites, newsletters, and visitors’ bookmarks. If you change the slug without taking precautions, all those visitors will end up on a 404 page. WordPress sometimes automatically handles a changed post slug with a redirect, but it doesn’t do this for pages, categories, or structural changes. That’s why I never rely on it and always set up a redirect myself.
How to Prevent 404 Errors with a 301 Redirect
A 301 redirect is a permanent redirect that sends visitors and search engines from the old URL to the new one, while largely preserving the value the old page has built up. A 302 is temporary, so you shouldn't use it here. I explain the difference between the two types in What are redirects?. This is the order I follow whenever I change a URL.
- Make a note of the old URL before you make any changes.
- Change the slug and click Update.
- Set up a 301 redirect from the old URL to the new one using the redirect module of an SEO plugin such as Rank Math, a plugin like Redirection, or a rule in
.htaccess. - Update internal links in menus and text to reflect the new address.
- Open the old URL in an incognito window and check to see if it takes you to the new page.
Redirect every old URL directly to the final address, not through an intermediate step. A chain from old to temporary to new adds extra load time for every visitor, and that matters too; see Making WordPress Faster. If you're moving to a completely different domain, it's more than just a slug change. For that, you'll need Changing Your WordPress URL the right step-by-step plan.
Check, and what if everything returns a 404?
After making changes, you’ll want to make sure there aren’t any 404 errors left. Click through the main menu and the footer, and check the internal links on your most-visited pages. For larger sites, Google Search Console shows under “Pages” which URLs cannot be found. If suddenly all your pages except the homepage are returning a 404, the rewrite rules are usually not set up correctly. In that case, go to Settings > Permalinks and click on it without changing anything Save changes. If that doesn't help, check to see if .htaccess exists and contains the WordPress rules.
With our shared hosting plans, you can .htaccess You can do this yourself via File Manager in cPanel, and you can restore a mistake using JetBackup 5. For a major URL change, be sure to create a backup yourself first, so you can restore to the exact moment just before the change; see restore a backup. At Managed WordPress Hosting So you have those resources at your disposal. If you don't want to handle the monthly updates and checks yourself, then WordPress maintenance that's all there is to it. You can find more information about managing your site in What WordPress is and what it's used for.
Frequently Asked Questions
Is a short URL always better for SEO?
Not necessarily shorter, but clearer. A slug of three to five words that includes the main keyword usually works well. Shortening a URL on a page that already ranks well rarely yields enough benefit to justify the redirect.
Should I ever delete old redirects?
No, leave them as they are as long as there are still links or visitors coming in via the old URL. A redirect costs next to nothing, but removing a redirect costs you visitors.
Can Surver set up an SEO plugin with a redirect module for me?
Yes. The SEO module in the premium add-ons It's Rank Math, and Surver will install and configure it for you. You can then use Rank Math's redirect module to create 301 redirects yourself.