A page has moved, a product URL has changed, or your site now uses HTTPS. In each case, website redirects can send visitors and search engines from an old address to the right destination. When redirects are set up carefully, people reach the page they expect. Poorly configured rules can create slow chains, confusing detours, or pages that never load.
This guide covers redirect types, destination planning, setup methods, and testing. The steps apply to many websites, including WordPress sites, though the exact controls depend on your host and server.
What website redirects do
A redirect tells a browser or search crawler that a requested URL should lead somewhere else. The browser requests the original address, receives a redirect response, then requests the destination. Visitors usually see only the final page, but the response code and destination matter behind the scenes.
Common reasons to redirect include:
- Changing a page or product URL.
- Combining duplicate pages into one useful resource.
- Moving a site to a new domain or switching to HTTPS.
- Removing a page that has a relevant replacement.
- Standardizing URL formats, such as trailing slashes or www versus non-www.
A redirect is not a substitute for a useful page. If a discontinued product has no close replacement, send visitors to a relevant category or helpful explanation rather than automatically sending every old URL to the homepage.
Choose the right redirect type
Use a 301 for a permanent move
A 301 status code means the move is permanent. Use it when an old URL should no longer be the preferred address, such as after a lasting page rename or a domain migration. Browsers and search engines can treat the destination as the replacement for the old URL.
Use a 302 for a temporary change
A 302 status code indicates a temporary redirect. It can suit a short-lived promotion, temporary maintenance, or another situation where the original address is expected to return. Update the redirect to a 301 if the move becomes permanent.
Other redirect status codes exist, but most routine page moves use 301 or 302. Start by deciding whether the original URL is coming back. Then choose the code that matches your plan and confirm that your website platform and hosting setup send the intended response.
Plan the destination before changing anything
Make a list of source URLs and their intended destinations. A source is the old address visitors may still use; a destination is the page they should reach instead. When planning a site-wide change, record representative URLs along with unusual paths, such as product pages, blog posts, or URLs with query parameters.
Use these checks to choose a destination:
- Match the visitor’s intent. A renamed service page should usually point to its new service page, not a general page.
- Keep the path relevant. A removed article may have a useful replacement, but an unrelated page is likely to frustrate visitors.
- Check the final URL. The destination should load successfully and use your site’s preferred version, including HTTPS where applicable.
- Note what should stay unchanged. During a domain change, preserve the path and query string when your setup supports it.
When a URL is broken and has no replacement, investigate why it returns an error before adding a redirect. This guide to fixing website 404 errors can help distinguish a missing page from one that needs a redirect.
Choose a setup method that fits your site
Redirects can be configured in a content management system, hosting control panel, web server, or content delivery network. Use one place as the main source of rules whenever possible. Duplicating the same redirect across several systems makes maintenance and troubleshooting harder.
WordPress plugin
A redirect plugin can be a practical option for managing individual page moves from a WordPress dashboard. Add the old path and destination, select the redirect type if the plugin offers that control, and save the rule. Avoid installing multiple plugins that manage the same redirects.
Check the plugin’s logs or monitoring features after saving a rule, if available. They may help identify old URLs visitors still request. Keep rules for URLs that matter, and remove obsolete or duplicated rules only after confirming that no other configuration depends on them.
Hosting panel or server configuration
Some hosts offer a redirect tool in their control panel. It can be convenient for domain-wide changes or simple rules. More advanced setups may use server settings, such as Apache’s .htaccess file or Nginx configuration.
Server rules can affect many pages at once. A typo or overly broad pattern may redirect pages that were meant to stay as they are. Save a copy of the original configuration before editing, and make sure you know how to restore it. When your hosting provider manages server settings, ask about its supported process instead of copying rules from an unrelated setup.
CDN or edge rules
A content delivery network may offer redirect rules that run before requests reach your web server. This can help with domain-wide or pattern-based changes, but check the order of existing rules and how the platform matches them. A CDN rule can conflict with one in WordPress or on the server, so test the complete request path.
Prevent redirect chains and loops
A redirect chain occurs when one address redirects to a second address, which then redirects to a third. For example, an old HTTP address might first redirect to HTTPS, then from a non-preferred hostname to the preferred hostname, and finally to the new page path. Each extra step adds work and makes diagnosis harder.
Whenever practical, point the old URL directly to the final destination. Review existing rules before adding new ones. When a page has moved several times, update the earlier rule rather than adding another link in the chain.
A redirect loop happens when rules send a browser back to an address it has already requested. One rule might force HTTPS while another sends that HTTPS request back to HTTP. When a browser reports too many redirects, temporarily disable or adjust the most recent rule and check for conflicting settings in your platform, server, and CDN.
Test each redirect after setup
Don’t assume a saved rule works as intended. Open the source URL in a private browser window or use a redirect-checking tool, then verify the response and final page. Test the exact old URL, including its protocol, hostname, capitalization, and path where relevant.
Confirm that:
- The old URL redirects to the intended destination.
- The destination loads successfully instead of returning another error.
- The redirect uses the expected status code.
- The request reaches the final page in one redirect where practical.
- Nearby pages that should not change still work normally.
Test a sample of URLs before applying a broad pattern across the site. Afterward, check your analytics and search tools for signs that visitors are still landing on old URLs or receiving errors. Keep a simple record of each rule, its reason, and the date you added it. That record makes future cleanup safer.
Maintain redirects as your site changes
Redirects often need to stay in place after a redesign or migration because old links may remain in bookmarks, emails, and other websites. Review your rules during routine maintenance. Look for chains, duplicate entries, destinations that no longer work, and rules that point to unrelated pages.
On a larger site migration, create a URL mapping before launch and test important pages on the new site. Keep the old-to-new mapping available afterward so you can investigate reports and correct missed pages. A clear plan, one source of redirect rules, and a quick verification pass help prevent URL changes from frustrating visitors.
