Back to Blog
Web Design

What Is a 301 Redirect and When Do You Need One?

Contractor leaning over the tailgate of a dusty gray pickup truck, typing on a laptop on a sunny dirt road

A 301 redirect is a permanent forwarding rule on your web server. Anyone who visits an old page address, including Google, lands on the new one automatically. You need one whenever a URL changes for good, such as after a redesign, a domain change or a move to HTTPS, so old links and search signals carry over.

Maybe you are rebuilding your website, switching to a shorter domain, or renaming a page from "services-drain" to "drain-cleaning." The new site looks great. But customers have bookmarked the old pages, other sites link to them, and Google has them in its results. Without redirects, every one of those visits ends on an error page.

What does a 301 redirect actually do?

It tells browsers and search engines that a page has moved for good and where it went. The "301" is the HTTP status code the server sends back, meaning "moved permanently." The visitor never sees it; the new page simply loads.

Google's guide to redirects and Google Search says a permanent redirect shows the new target in search results, and that Google treats it as a strong signal that the new address is the one to index. Google's site move guide also states that 301 and other permanent redirects don't cause a loss in PageRank, the link value a page has earned.

When do I need a 301 redirect?

You need one any time a page that people or Google already know about gets a new permanent address. These are the common cases for a local business.

You redesigned your site and page addresses changed

A new website often renames pages. If your old "/our-services/water-heaters.html" becomes "/water-heater-repair," redirect the old address to the new one.

You changed your domain name

Moving from a long domain to a shorter one means every old page needs to point to its match on the new domain. Before you switch, make sure you control the old domain too; our guide on who should own your domain explains why that matters.

You moved from HTTP to HTTPS

When a site gets a security certificate, every "http://" address should forward to its "https://" version. Our guide to SSL certificates and the "Not secure" warning walks through that switch.

You merged or removed pages

If you combine three thin service pages into one strong page, redirect all three to the new one. If a service is gone and there is no close replacement, see the section on deleted pages below.

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

A 301 is permanent and a 302 is temporary. Google's status code documentation calls a 301 a strong signal that the target should be the indexed page, and a 302 a weak signal.

Redirect Meaning What Google shows Use it when
301 Moved permanently The new page A page has a new home for good
308 Moved permanently The new page (treated like a 301) Same as 301, if your host offers it
302 / 307 Moved temporarily Usually the old page A page is down briefly, such as a seasonal menu
Meta refresh or JavaScript A page-level instruction Depends on the setup Only when you can't set a server redirect

Google recommends server-side redirects. It says to use JavaScript redirects only if you can't do server-side or meta refresh redirects, because Google may not see them.

How long should I keep a 301 redirect?

Keep it for as long as possible, and at least one year. Google's site move guide says to keep redirects generally at least 1 year, and suggests considering keeping them indefinitely for the sake of visitors with old bookmarks.

A redirect costs almost nothing to leave in place. Removing it early means old links start failing again, often without anyone noticing.

What are the most common redirect mistakes?

Most redirect problems come from rushing the switch to a new site. Watch for these.

  • Sending every old page to the homepage. Google's site move guide warns that redirecting many old URLs to one unrelated page, such as the home page, might be treated as a soft 404 error, meaning Google treats it like a missing page. Map each old page to its closest match.
  • Building redirect chains. Old page to newer page to newest page wastes time. Google says Googlebot can follow up to 10 hops, but advises redirecting straight to the final page and, if that isn't possible, keeping chains short.
  • Forgetting pages you didn't know about. Old blog posts, PDF price sheets and landing pages from past ads often still get visits. Google suggests listing old URLs from your sitemap, analytics and server logs before you move.
  • Using a temporary redirect for a permanent move. A 302 tells Google to keep showing the old page.

What if a page is gone for good?

If a page has no reasonable replacement, let it return a "404 not found" or "410 gone" error instead of forcing a redirect. Google's site move guide recommends exactly this for content that is not moving. Make your 404 page friendly, with your phone number and links to your main services, so a lost customer still has somewhere to go. Our guide to fixing 404 errors and broken links covers what that page should include.

A redirect checklist for your next website rebuild

Use this before a new site goes live. It works whether you build the site yourself or hire someone, and it is worth asking any web designer how they handle each step.

  1. Export a list of every current page address (your sitemap is a good start).
  2. Write the new address next to each old one. Group retired pages with their closest replacement.
  3. Set up 301 redirects on the server for every row.
  4. After launch, click through old addresses, including ones from your Google Business Profile, social posts and ads.
  5. Check Google Search Console for pages reported as not found over the next few weeks. Google says a small to medium-sized site can take a few weeks for most pages to move in its results.
  6. Leave the redirects in place for at least a year.

A plumber who renames "/services-drain" to "/drain-cleaning" needs only one line of redirect, but it protects every link and bookmark pointing to the old page. Our plumber website guide covers which service pages are worth having in the first place, and our guide to the pages a small business website should have helps you plan the new structure before you map anything.

Frequently asked questions

Do 301 redirects hurt SEO?

No. Google says 301 and other permanent redirects don't cause a loss in PageRank. Rankings can move around for a few weeks while Google processes a big change, which is normal.

Can I set up a 301 redirect myself?

Usually, yes. Many website builders and hosting dashboards have a redirects or URL forwarding setting where you enter the old path and the new one. If your site runs on its own server, your developer or host can add the rules.

Should I redirect my old domain to my new domain?

Yes, page by page, and keep the old domain registered so the redirects keep working. If the old domain expires, every redirect from it stops.

How do I check if a redirect is working?

Type the old address into your browser and confirm it lands on the right new page. Free online redirect checkers also show whether the server returned a 301 or a 302.

Related: What is an SSL certificate and why does my site say "Not secure"? · Who should own your domain? · What pages should a small business website have?