Permalinks, 404 Errors, and Proper Redirects in WordPress

Sketsa alamat lama yang dialihkan dengan redirect 301 ke alamat baru, dibandingkan dengan halaman 404 tanpa pengalihan

Written by

in

Quick Summary
  • Set your permalink structure to post name so page addresses are short, readable, and search-engine friendly.
  • Fix WordPress 404 errors by re-saving your permalink settings or checking server configurations step by step.
  • Use 301 redirects to permanently move old addresses, and you can request help from Ari Digital Creative for proper technical setup.

Page addresses (URLs) seem trivial, but changing them incorrectly can land visitors on a 404 page and cause search rankings to drop. This article summarizes how to choose a permalink, fix 404 errors, and set up redirects properly.

Sketch of an old address redirected with a 301 redirect to a new address, compared to a 404 page without a redirect

Go to Settings > Permalinks. For almost all sites, the best choice is Post name (/post-name/): short, readable, and descriptive of the page content.

  • Choose this structure at the beginning, before the site has many pages.
  • On an established site that is already indexed by Google, do not change the structure without a redirection plan, because all old addresses will change at once.
  • Keep slugs (the end part of the address) short, lowercase, and hyphen-separated. Drop unnecessary conjunctions.

Sudden 404 errors

Classic symptoms: the homepage looks normal, but articles and other pages display "404 Not Found", usually after changing hosting, changing plugins, or modifying settings. Try these in order:

  1. Resave permalinks. Go to Settings > Permalinks and click Save Changes without altering anything. This updates internal WordPress address rules and often solves the issue immediately.
  2. Check the .htaccess file on Apache servers. This file must exist in the site’s root folder and contain WordPress rules. If it is missing or corrupted, resave permalinks to have it regenerated.
  3. On Nginx, rules reside in the server configuration, not in .htaccess. Ask your hosting provider to ensure the try_files directive points to index.php.
  4. Temporarily deactivate plugins if the 404 appeared right after installing a new plugin. Some plugins alter address rules.
  5. Check slugs. Make sure no two pages share the same address or conflict with other content types.

Redirects: when and how

Redirects route an old address to a new one. Two types you need to know:

Read also White Screen and Common WordPress Errors: How to Read debug.log

Code Meaning Use when
301 Permanent move The address is changing forever (slug change, structure change, domain change)
302 Temporary move A short-term redirection, e.g., a page is under maintenance

With a 301, search engines understand that the new address replaces the old one, transferring most of the old page’s SEO value.

When are redirects needed?

  • You change the slug of a published article. WordPress generally redirects old article addresses automatically, but still test it by opening them.
  • You delete a page that still receives visitors or inbound links.
  • You change your permalink structure or migrate domains.

Healthy redirect rules

  1. Point to a page that is genuinely relevant. Redirecting everything to the homepage causes search engines to treat it as a soft 404.
  2. Avoid chains (A to B to C). Redirect A straight to C.
  3. Avoid loops (A to B, then B back to A), as the page will fail to load.
  4. After creating a redirect, update internal links so they point directly to the new address.
  5. If you use SmartRank SEO, its redirect and 404 monitor features log frequently requested addresses that do not exist, allowing you to create redirects for the most visited ones.

    Read also Proper WordPress Backup: The 3-2-1 Rule for Beginners

    How to check

    Open the old address in an incognito window. You should be automatically taken to the new address. In Google Search Console, the Pages report shows unindexed (404) addresses, so check it regularly.

    Frequently Asked Questions

    What is the recommended permalink structure for WordPress sites?

    The best choice for almost all sites is the Post name structure (/post-name/). It creates short, readable addresses that clearly describe the page content. It is best to set this structure at the very beginning before the site accumulates many pages to avoid future complications.

    Why do sudden 404 errors happen after changing settings and how can I fix them?

    Sudden 404 errors typically occur after modifying settings, changing plugins, or switching hosting. You can often fix this by simply going to Settings, Permalinks, and clicking Save Changes to update internal rules. If technical issues persist during updates, diagnosing server errors can help identify underlying root causes for your Ari Digital Creative deployment.

    What is the difference between a 301 and a 302 redirect?

    A 301 redirect is a permanent move used when an address changes forever due to a slug, structure, or domain change, transferring most SEO value. A 302 redirect is a temporary move used for short-term situations such as a page undergoing maintenance.

    When should I set up a redirect for my web pages?

    You should set up a redirect when you change the slug of a published article, delete a page that still receives visitors or inbound links, or migrate your entire domain and change your overall permalink structure.

    How can I maintain healthy redirect rules without harming SEO?

    Point your redirects to genuinely relevant pages rather than the homepage to avoid soft 404 errors. Always avoid redirect chains and loops, and remember to update internal links so they point directly to the new destination address.