Hosting WordPress Spanish version

Support article

WordPress Permalinks: How to Configure Them

Choose and configure WordPress permalinks, make your URLs clearer, and fix 404 errors after changing them.

Published: 30/06/2026 Updated: 12/07/2026

Permalinks are the URL addresses for posts, pages, categories, and other WordPress content, for example https://yourdomain.com/how-to-set-up-email/.

A clear structure helps users understand the content and makes links easier to share. WordPress lets you pick the structure under Settings > Permalinks.

Available structures

  • Plain (?p=123): works even without rewrite rules, but doesn’t describe the content and is less readable.
  • Day and name (/2026/07/11/post-title/): suitable when the exact date matters, like daily news.
  • Month and name (/2026/07/post-title/): keeps a time reference with a somewhat shorter URL.
  • Numeric (/archives/123): stable, but tells the user little.
  • Post name (/post-title/): usually clear for corporate sites, blogs, and evergreen content.
  • Custom structure, combining tags like /%category%/%postname%/.

Complex structures should be chosen for a real need, not just to add extra words.

Which structure to choose

For a corporate site or general blog, /%postname%/ usually gives short, understandable URLs. For a news outlet, it can help to include the date or category (/%year%/%monthnum%/%postname%/). For a knowledge base, a structure with a section can help (/help/%postname%/). For an online store, don’t change product, category, and tag bases without planning — check your e-commerce plugin’s settings.

There’s no universally best structure for SEO. The priority is that it’s stable, readable, consistent, and doesn’t contain information that will change often.

Go to Settings > Permalinks, choose the structure, check the optional category and tag bases, click Save Changes, and test the homepage, a post, a page, and a category. When you save, WordPress tries to update the rewrite rules: on Apache it’s usually done via .htaccess; on Nginx, the rules are set at the server level.

What a slug is

The slug is the editable part that identifies a piece of content within the URL. In https://yourdomain.com/create-email-account/, the slug is create-email-account. Use slugs that are short and descriptive, in lowercase, with hyphens, without accents or special characters, and different for different content. WordPress may add -2 if the slug is already in use or still sitting in the trash.

Changing the permalink of a post or page

Edit the content, change the slug in the link settings, update the post or page, and set up a redirect from the old address to the new one if the content was already published. Don’t change published URLs without redirecting them — visitors, external links, and search engines may still be using the old address.

How to change the structure on an existing site

Changing the global structure can affect hundreds or thousands of URLs. First, take a full backup (see WordPress backup and restore), export a list of current URLs, define the new structure, and prepare 301 redirects. Make the change in a staging environment and check the sitemap, canonicals, and internal links before applying it in production.

Afterward, save the permalinks, clear caches, spot-check a broad sample of URLs, check for 404 errors, update the sitemap, and keep the old redirects in place. A redirect should send each old URL to its equivalent, not all of them to the homepage.

Available structure tags

Some common tags are %year%, %monthnum%, %day%, %post_id%, %postname%, %category%, and %author%. Don’t add too many components — the more variable data there is, the harder it is to keep URLs stable.

Categories and tags

WordPress can use bases like /category/news/ and /tag/wordpress/, which you can change under Settings > Permalinks. If you change a base on a published site, set up redirects from the old URLs. Fully removing the category base may require code or a plugin and can create conflicts with pages or slugs — check compatibility carefully.

On Apache, WordPress uses .htaccess rules similar to:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Don’t copy this block without checking the install path — WordPress generates rules tailored to the site’s location. If .htaccess isn’t writable, WordPress may show you the rules to add manually.

On Nginx, which doesn’t read .htaccess, a common setup uses try_files, adapted to the server:

location / {
    try_files $uri $uri/ /index.php?$args;
}

If you don’t manage the server, ask support to review the rules.

Go to Settings > Permalinks and click Save Changes, even if you don’t change anything. Check .htaccess (back it up, check permissions, and rule out custom rules that intercept the URLs) or confirm mod_rewrite is enabled on Apache. Clear every cache and look for slug conflicts: a page, category, or content type may be using the same slug (see also WordPress 500 error and white screen if the problem persists).

Common issues

WordPress can’t write .htaccess

Adjust ownership and permissions carefully, or paste the rules in manually. Don’t use 777.

Pages work, but products don’t

Check your e-commerce plugin’s permalink settings and save them again.

The URL contains index.php

The server may not have rewriting enabled, or the configuration may require a structure that includes index.php.

The homepage works, but internal pages show 404

This is the typical symptom of missing or incorrect rewrite rules.

Frequently asked questions

Yes, if it changes already-indexed URLs and you don’t set up redirects. With a planned migration, the impact can be reduced.

Can I use spaces or accents in the slug?

WordPress can convert them, but it’s better to use lowercase, simple words, and hyphens.

Why does WordPress add -2?

There’s other content with the same slug, even in the trash. Find the duplicate or choose a different identifier.

No. It regenerates the rewrite rules, though an incorrect server configuration can still cause errors.

Conclusion

A good permalink structure should be clear, stable, and easy to maintain. For many sites, /%postname%/ is a solid base, but the choice should reflect how the content is actually organized.

If you’re going to change already-published URLs, back up, prepare 301 redirects, and monitor for 404 errors. A simple structure from the start avoids unnecessary migrations later.