🚀 Ultra-fast web hosting from just $1/month!
HostPedia

Permalinks

WordPress
Definition

Permalinks is the permanent URL structure used to access individual pages, posts, categories, and other content on a WordPress site. They define how links look and behave, typically combining elements like the post name, date, or category. A well-chosen permalink format improves readability, supports SEO, and reduces broken links when content is shared, indexed, or bookmarked.

How It Works

In WordPress, a permalink is generated from the site domain plus a path pattern you choose in Settings > Permalinks. Common patterns include the post name (for example, /sample-post/), date-based structures, or custom structures that use placeholders such as %postname%, %category%, or %year%. WordPress stores the chosen structure and applies it when creating links for posts, pages, archives, and feeds.

Behind the scenes, “pretty permalinks” rely on URL rewriting. On Apache this is typically handled via .htaccess rules and mod_rewrite; on Nginx it is handled via server block rewrite rules. When a request comes in, the web server rewrites the friendly URL to WordPress index.php, and WordPress resolves it to the correct content using its routing and query system. If rewrite rules are missing or the server is misconfigured, you may see 404 errors until permalinks are flushed and the server rules are corrected.

Why It Matters for Web Hosting

Permalinks affect how reliably your WordPress site serves pages and how easily you can change URL structures without downtime. When comparing hosting plans, confirm the stack supports WordPress rewrite rules (Apache or properly configured Nginx), allows editing or automatically managing rewrite configuration, and provides access to basic tools (file manager, SSH, or control panel) to troubleshoot 404s and redirect changes. Good hosting also makes it easier to implement HTTPS and redirects so old permalinks keep working after migrations.

Types of Permalinks

  • Plain (query string) format, such as ?p=123, which avoids rewrites but is less readable
  • Post name structure, typically /%postname%/, common for blogs and marketing sites
  • Day and name or month and name structures, which include dates in the URL path
  • Numeric structure, such as /archives/%post_id%/, stable but not descriptive
  • Custom structures using tags like %category% or %author%, useful for large sites but can add complexity

Permalinks vs Redirects

Permalinks define the canonical URL pattern WordPress uses to generate links, while redirects map old URLs to new ones after a change. Changing permalink settings can break inbound links unless you add 301 redirects at the web server level or via a WordPress plugin. For hosting decisions, this means you want a plan that supports rewrite rules and redirect management, because permalink changes, HTTPS moves, and domain migrations are common and should not result in long-term 404 errors or lost search visibility.