Have you ever clicked on a link and received a “page not found” error message? Redirects prevent this. They automatically direct visitors and search engines to the correct page. Redirects are crucial for both SEO and user experience. For SEO, they maintain link equity and ensure your rankings stay intact. Additionally, it improves the user experience because no one likes dead ends.
Key insights
- A redirect automatically directs users and search engines from one URL to another, preventing errors such as “page not found.”
- Redirects are crucial for SEO and user experience, maintaining link equity, and maintaining rankings.
- There are different types of redirects: 301 for permanent moves and 302 for temporary moves.
- Avoid client-side redirects such as Meta-Refresh or JavaScript as these can harm search engine optimization.
- Use Yoast SEO Premium to easily set up and manage redirects on your website.
What is a redirect?
A redirect is a method that automatically redirects users and search engines from one URL to another. For example, if you delete a page, a redirect instead of a 404 error could result in visitors being taken to a new or related page.
This is how redirects work
- A user or search engine requests a URL (e.g. yoursite.com/page-old).
- The server responds with a redirection instruction.
- The browser or search engine follows the redirect to the new URL (e.g. yoursite.com/page-new).
Redirects can point to any URL, even to another domain.
Why redirects are important
Redirects keep your website running smoothly. Without it, visitors end up in dead ends, links break and search engines are lost. These aren’t just technical solutions, as they protect your traffic, maintain rankings, and ensure users end up where they’re supposed to. Whether you’re moving a page, correcting a typo in a URL, or removing old content, redirects ensure nothing is left behind.
When should a redirect be used?
Use redirects in these scenarios:
- Deleted pages: Redirect to a similar page to keep traffic flowing.
- Domain changes: Redirect the old domain to the new one.
- HTTP→HTTPS: Redirect unsafe URLs to secure ones.
- URL restructuring: Redirect old URLs to new ones (e.g. /blog/post → /articles/post).
- Temporary changes: Use a 302 for A/B testing or maintenance pages.
Types of redirects
There are different types of redirects, each serving a specific purpose. Some are permanent, some are temporary, and some you should avoid altogether. Here’s what you need to know to choose the right one.
Not all redirects work the same way. A 301 redirect tells search engines that a page has been permanently moved while a 302 redirect signals a temporary change. Client-side redirects like Meta-Refresh or JavaScript exist because they are sometimes the only option on restrictive hosting platforms or static websites, but they often cause more problems than they solve. Below we explain each type, explain when to use each, and discuss its impact on your SEO.
Redirect types at a glance
| Redirect type | Use case | When to use | Effects on the browser | SEO impact | SEO risk |
| 301 | Permanent move | Deleted pages, domain changes, HTTP→HTTPS | Cached forever | Hands over (almost) all of the link equity | If used correctly, none |
| 302 | Temporary move | A/B testing, maintenance pages | Not cached | Link equity may not be passed on | Can dilute SEO if used long term |
| 307 | Temporary relocation (strict) | API calls, temporary content moves | Not cached | Search engines may ignore | High for abuse |
| 308 | Permanent move (strict) | Rarely; Use 301 instead | Cached forever | Passes link equity | None |
| Meta update | Client-side redirection | Avoid it where possible | Slow, not cached | Unreliable | High (hurts UX/SEO) |
| JavaScript | Client-side redirection | Avoid it where possible | Slow, not cached | Unreliable | High (hurts UX/SEO) |
301 Redirects: Permanent Movements
A 301 redirect tells browsers and search engines that a page has been permanently moved. Use it when:
- You delete a page and want to redirect visitors to a similar page.
- You change your domain name.
- You switch from HTTP to HTTPS.
SEO impact: 301 redirects direct virtually all link equity to the new URL. However, make sure you never redirect to irrelevant pages as this can confuse users and harm search engine optimization. For example, redirect a deleted blog post about “Best Running Shoes” to your homepage instead of a similar post about running gear. This wastes link equity and frustrates visitors.
Example of an HTTP header:
HTTP/1.1 301 Moved Permanently
Location: https://example.com/new-page
302 Redirects: Temporary relocations
A 302 redirect tells browsers and search engines that a relocation is temporary. Use it for:
- A/B testing different versions of a page.
- Temporary promotions or sales pages.
- Maintenance pages.
SEO impact: 302 redirects typically do not achieve ranking performance, unlike 301 redirects. Google treats them as temporary, so the SEO value may not be retained. For permanent moves, always use a 301 to ensure a smooth link equity transfer.
Examples of using a 301 and 302 redirect:
Example 1: Temporarily out of stock product (302): An online store redirects example.com/red-sneakers to example.com/blue-sneakers while restocking the red sneakers. A 302 redirect Keeps the original URL alive for future use.
Example 2: A permanent domain change (301): A company moves from old-site.com to new-site.com. A 301 redirect ensures that visitors and search engines land on the new domain while maintaining SEO rankings.
307 and 308 redirects: Strict rules
These redirects follow stricter HTTP rules than 301 or 302:
- Same method: When a browser sends a POST request, redirection occurs must Also use POST.
- caching:
- 307: Never cached (temporarily).
- 308: Always cached (permanent).
When to use them:
- 307: For temporary redirects to where you are must Keep the same HTTP method (e.g. forms or API calls).
- 308: Almost never, use a 301 instead.
For most websites: Stick with it 301 (permanent) or 302 (temporary). These only apply to special technical cases.
What you should know around Client-side redirects:
Client-side redirects such as Meta-Refresh or JavaScript are executed in the browser and not on the server. They are rarely the right choice, but you might encounter them for the following reasons:
- Meta update: An HTML tag that redirects after a delay (e.g. “You will be redirected in 5 seconds…”).
- JavaScript redirects: Code that changes the URL after the page loads.
Why you should avoid them?
- Slow: The browser needs to load the page first and then redirect.
- Unreliable: Search engines may ignore them, which hurts search engine optimization.
- Bad UX: Users see a quick look at the original page before being redirected.
- Security risks: JavaScript redirects can be exploited for phishing.
If they are used (despite the risks):
- Shared hosting without server access.
- Legacy systems or static HTML sites.
- Ad tracking or A/B testing tools.
If possible, stick to server-side redirects (301/302). If you must use a client-side redirect, test it thoroughly and look out for SEO issues.
How redirects affect SEO
Redirects do more than just send users to a new URL. They influence how search engines crawl, index and rank your website. A well-planned redirect preserves traffic and rankings. A sloppy approach can ruin both. Here’s what you need to know about their effects.
Ranking power
301 redirects redirect most of the link equity from the old URL to the new one. This will help you maintain your ranking. 302 redirects may not be able to achieve ranking power, especially if used long-term.
Crawl budget
Too many redirects can slow down search engines crawling your site. Avoid redirect chains (A→B→C) to save crawl budget.
User experience
Redirects prevent 404 errors and keep users engaged. Smooth redirection can reduce bounce rates.
Common redirect errors
Redirects seem simple, but small mistakes can cause big problems. Here are the most common mistakes and how to avoid them.
Redirect chains
A redirect chain occurs when one URL redirects to another, which redirects to another, and so on. For example:
old-page → new-page → updated-page → final-page
Why it’s bad:
- Slows down the user experience.
- Wastes crawling budget as search engines may stop following the chain before reaching the final URL.
- Decreases ranking power with each jump.
How to fix the problem:
- Map old URLs directly to their final destination.
- Use tools like Screaming frog Find and repair chains.
Redirect loops
A redirect loop sends users and search engines in circles. For example:
page-A → page-B → page-A → page-B...
Why it’s bad:
- Users see an error page (e.g. “Too many redirects”).
- Search engines cannot access the content, so it will not be ranked.
How to fix the problem:
- Check your forwarding rules on cblonflicts.
- Test redirects using a tool like Detour path (Chrome extension) or
curl -vin the terminal.
Using 302 for permanent movements
A 302 redirect is intended for temporary changes, but many websites use it for permanent changes. For example:
- Redirect
old-productTonew-productwith a 302 and left it for years.
Why it’s bad:
- Search engines may not pass link equity to the new URL.
- The old URL may remain in search results longer than intended.
How to fix the problem:
- Use a 301 for persistent moves.
- If you accidentally used a 302, switch to a 301 as quickly as possible.
Redirect to irrelevant pages
Redirecting a page to unrelated content confuses users and search engines. For example:
- Redirect a blog post about “Best Running Shoes” to the homepage or a page about “Kitchen Appliances.”
Why it’s bad:
- Users land on content they didn’t expect, resulting in higher bounce rates.
- Search engines may ignore the redirect or penalize it as manipulative.
- Wastes ranking power that could have been given to a relevant page.
How to fix the problem:
- Always redirect to the most relevant page available.
- If there is no relevant page, have the old URL return a 404 or 410 error instead.
Ignoring internal links after redirects
After setting up a redirect, many websites forget to update internal links. For example:
- Redirect
old-pageTonew-pagebut to keep linksold-pagein the navigation or in blog posts of the website.
Why it’s bad:
- Internal links to the old URL force users and search engines to redirect, slowing down the experience.
- Wastes crawling budget and weakens ranking power.
How to fix the problem:
- Update all internal links to point directly to the new URL.
- Use a tool like Screaming Frog to find and fix outdated links.
Redirects are not tested
Assuming that redirects work without testing can lead to surprises. For example:
- Set up a redirect, but don’t check whether it redirects users to the correct location.
- Missing errors like 404 errors or redirect loops.
Why it’s bad:
- Broken redirects frustrate users and affect search engine optimization.
- Search engines can remove pages from the index if they cannot access them.
How to fix the problem:
- Test each redirect manually or with a tool.
- After implementing redirects, check Google Search Console for crawl errors.
Redirect everything to the homepage
When a page is deleted, some websites redirect all traffic to the home page. For example:
- Redirect
old-blog-postToexample.cominstead of a relevant blog post.
Why it’s bad:
- Confuses users who were expecting certain content.
- Search engines may see this as a “soft 404” and ignore the redirect.
- Wastes ranking power that could have been given to a relevant page.
How to fix the problem:
- Redirect to the most relevant page available.
- If there is no relevant page, return a 404 or 410 error.
Forgetting to update sitemaps
After setting up redirects, many websites forget to update their XML sitemaps. For example:
- Keep the old URL in the sitemap while redirecting to a new URL.
Why it’s bad:
- Sends mixed signals to search engines.
- Wastes crawling budget on stale URLs.
How to fix the problem:
- Remove old URLs from the sitemap.
- Add the new URLs to help search engines find them faster.
Using redirects for thin or duplicate content
Some websites use redirects to hide thin or duplicate content. For example, multiple low-quality pages can be redirected to a single high-quality page to “clean up” the site.
Why it’s bad:
- Search engines might see this as manipulative.
- Doesn’t address the root problem, which is low-quality content.
How to fix the problem:
- Improve or consolidate content instead of redirecting it.
- Use canonical tags when duplicate content is unavoidable.
Redirects are not monitored over time
Redirects are not a task that you just have to do. For example:
- Set up a redirect and never check if it is still needed or working.
Why it’s bad:
- Redirects may be interrupted over time (e.g. due to site updates or server changes).
- Unnecessary redirects waste crawling budget.
How to fix the problem:
- Check redirects regularly (e.g. every 6 months).
- Remove redirects that are no longer needed.
How to set up a forwarding
Setting up redirects isn’t complicated, but the steps vary depending on the platform. Below are simple instructions for the most common setups, whether you’re using WordPress, Apache, Nginx, or Cloudflare.
Choose the method that suits your setup and follow it. If you’re not sure which one to use, start with the platform you’re most comfortable with.
WordPress (with Yoast SEO Premium)
Yoast SEO Premium makes it easy to set up redirects, especially when you delete or move content. Here’s how:
Option 1: Manual redirects
- Go to Yoast SEO → Redirects in your WordPress dashboard.
- Enter that old URL (the one you want to redirect out of).
- Enter that new URL (the one you want to redirect To).
- Select the redirection type:
- 301 (permanent): For deleted or permanently moved pages.
- 302 (Found): For short-term changes.
- Click Add redirect.
Option 2: Automatic redirects when deleting content
Yoast SEO can automatically create redirects when you delete a post or page. Here’s how:
- Go to Posts or pages in your WordPress dashboard.
- Find the post or page you want to delete and click on it Garbage.
- Yoast SEO will display a pop-up asking what you want to do with the deleted content. You will see two options:
- Redirect to another URL: Enter a new URL to redirect visitors to.
- Returns a 410 Content Deleted header: Inform search engines that the page is permanently deleted and should be removed from their index.
- Choose your preferred option and confirm.
This feature saves time and ensures visitors land on the right page. No manual setup required.
Need help with redirects? Attempt Yoast SEO Premium
No code, no hassle. Only Smarter redirects and many other invaluable tools.
Apache (.htaccess file)
Apache uses the .htaccess File for managing redirects. If your site runs on Apache, this is the easiest way to set it up. Add the following rules to yours .htaccess Make sure it is in the root of your site.
Add these lines to yours .htaccess File:
# 301 Redirect
Redirect 301 /old-page.html /new-page.html
# 302 Redirect
Redirect 302 /temporary-page.html /new-page.html
Nginx (server configuration)
Nginx handles redirects in the server configuration file. If your site is running on Nginx, add these rules to your server block and then reload the service to apply the changes.
Add this to your server configuration:
# 301 Redirect
server {
listen 80;
server_name example.com;
return 301 https://example.com$request_uri;
}
# 302 Redirect
server {
listen 80;
server_name example.com;
location = /old-page {
return 302 /new-page;
}
}
Cloudflare (Page Rules)
Cloud flare allows you to set up redirects without changing server files. Create a page rule to route traffic from one URL to another without the need for coding. Simply enter the old and new URL, select the redirect type and click Save.
- Go to Rules → Page Rules.
- Enter the old URL (e.g. example.com/old-page).
- Choose Redirect URL and choose 301 or 302.
- Enter the new URL (e.g. https://example.com/new-page).
Troubleshooting redirects
Redirects don’t always work as expected. A typo, a cached page, or a conflicting rule can break them or, worse, create loops that frustrate users and search engines. Below you will find the most common problems and how to fix them.
If something doesn’t work, start with the basics: check for errors, test thoroughly, and clear your cache. The solutions are usually simpler than they seem.
Why is my forwarding not working?
- Check for typos: Make sure the URLs are correct.
- Clear your cache: Browsers aggressively cache 301 redirects.
- Try it with curls: Run
curl -v http://yoursite.com/old-urlto display the HTTP headers.
Can redirects harm SEO?
Yes, if you:
- Create redirect chains (
A→B→C) - Use 302 for persistent moves
- Redirect to irrelevant pages
How do I find broken redirects?
- Use Google Search Console → Coverage report.
- Use Screaming frog to crawl your website for 404 errors and redirects.
What is the difference between a 301 and a 308 redirect?
- 301: Most common in permanent moves. Wide browser support.
- 308: Strict permanent forwarding. Rarely used. Same SEO impact as 301.
What is a Proxy Redirect?
With a proxy redirect, the URL remains the same in the browser but retrieves content from a different location. Used for load balancing or A/B testing. Avoid it for SEO reasons as search engines may not follow them.
Diploma via redirects
Redirects are a simple but powerful tool. A redirect automatically directs users and search engines from one URL to another. As a result, they keep your website running smoothly and maintain SEO value and ranking performance. Remember:
- Use 301 redirects for permanent moves.
- Use 302 redirects for temporary changes.
- Avoid client-side redirects like Meta-Refresh or JavaScript.
Do you need help? Try Yoast SEO Premium Redirect Manager.


