
How to Test Robots.txt Before It Goes Live (2026)
A bad robots.txt file can hide your whole site from Google. This guide shows how to test it in Search Console, check single pages, and avoid the most common mistakes.

A 301 redirect is a permanent way to send visitors and search engines from one web address to another. When someone types in or clicks an old URL, the server answers with a “301 Moved Permanently” message and points them to the new page instead. The visitor never sees an error page, and Google moves most of the old page’s ranking power to the new one.
Think of it like a mail forwarding order. When you move house, you tell the post office to send your mail to the new address. A 301 redirect does the same thing for a web page: it tells browsers and search engines, “this page has moved for good, go here instead.”
If you run a website, you will need 301 redirects sooner or later. You change a page URL, you redesign your site, you move to a new domain, or you delete a page that has a better replacement. In each case, a 301 redirect keeps your visitors and your Google rankings safe.
A 301 redirect works in four quick steps, all behind the scenes:
The whole thing takes a fraction of a second. The “301” is just the number of the message. Web servers use numbers called status codes to describe what happened: 200 means “all good, here is the page,” 404 means “page not found,” and 301 means “moved for good.”

Say your site has a page at example.com/old-services. You rewrite the page and give it a better address: example.com/services. Without a redirect, anyone who visits the old address gets a 404 error, and Google still shows the old address in search results.
With a 301 redirect in place, the old address sends everyone to the new one. Old links from other sites still work. Bookmarks still work. Google updates its index and passes most of the old page’s authority to the new page. Nothing is lost.
A 301 redirect protects three things that matter for search rankings.
It saves your link power. When other sites link to your old page, those links still count. A 301 redirect passes most of that ranking power to the new page. Google has said a 301 redirect passes nearly all of the old page’s ranking signals. If you delete the page instead, those links point to a dead end and their value is lost.
It stops duplicate content. The same page can live at more than one address: with and without “www,” with and without a slash at the end, or on both HTTP and HTTPS. Search engines can treat those as separate pages with the same content. A 301 redirect points every version to one main address, so your ranking power is not split.
It keeps visitors happy. A visitor who lands on a 404 error page usually leaves. A redirect sends them to the page they wanted, so they stay. Fewer dead ends means a better experience, and Google pays attention to that.
Use a 301 redirect only when a move is permanent. Here are the most common cases:
A 301 redirect is the wrong tool in a few common cases:
The difference is simple: a 301 redirect is permanent, and a 302 redirect is temporary.
| 301 Redirect | 302 Redirect | |
|---|---|---|
| Meaning | Moved permanently | Moved temporarily |
| Ranking power | Passes most of it to the new page | Stays with the old page |
| Google’s index | Replaces the old URL with the new one | Keeps the old URL listed |
| Use it when | A page moves for good | A page moves for a short time |
Most redirects on a normal website are 301s. Use a 302 only when you plan to bring the old page back.
A 308 redirect is the strict cousin of the 301. Both mean “moved permanently,” but they treat form data differently.
When a browser follows a 301 redirect after a form is sent (a POST request), it usually changes the request to a GET request. That drops the form data. A 308 redirect keeps the request method the same, so the form data survives the trip.
For normal web pages, this rarely matters, because visitors arrive with GET requests. Use a 301 redirect for pages, links, and site moves. Use a 308 only when a form or an API call must keep its POST data through the redirect. In practice, almost every website owner will only ever need a 301.
A 307 redirect is the temporary version of a 308: it means “moved temporarily” but keeps the request method unchanged, just like a 308 keeps it for permanent moves. The simple rule is:
For nearly all website work, 301 and 302 are the only two you need to know.

The exact steps depend on how your site is built. Here are the four most common ways.
The easiest way in WordPress is a free plugin such as Redirection or the redirect tool inside Rank Math:
You can also add redirects in Rank Math under Rank Math > Redirections. Test each redirect right after you save it.
If your site runs on Apache, you can add a line to the .htaccess file in your site’s root folder:
Redirect 301 /old-page https://example.com/new-page
For a full domain move, this rule sends every old address to the matching new one:
RewriteEngine On RewriteRule ^(.*)$ https://newdomain.com/$1 [R=301,L]
Back up the file before you edit it. One wrong line in .htaccess can take your whole site down.
Shopify creates 301 redirects by default, and it even offers to create one automatically when you change a product or page URL.
Wix also lets you upload a spreadsheet of redirects in bulk, which helps during a site migration.
The redirect itself works the moment you save it: visitors reach the new page right away. Google is slower. Search engines need to crawl the old URL again, see the 301, and then update their index.
On a small site that Google crawls often, that can take a few days. On a large site, or one Google visits rarely, it can take a few weeks. You can speed it up by asking Google to recrawl the old URL in Google Search Console and by updating your sitemap so it lists only the new URL.
Do not judge the result in the first 48 hours. Check again after a week or two, and look at whether the new page is gaining the old page’s traffic.
Keep it in place for at least a year, and ideally for good. There is no harm in leaving a redirect running, and removing it has a real cost: old links and bookmarks break, and Google may bring the old URL back into its index.
If you must remove a redirect, first check that no other site still links to the old URL and that Google no longer shows it in search results. When in doubt, leave the redirect alone. It costs nothing to keep, and it protects traffic you worked hard to earn.
Always test a redirect after you set it up. Here is a simple routine:
If the old page still loads instead of redirecting, clear your browser cache first. Browsers save 301 redirects aggressively, so an old test can fool you. A private window or a different browser gives a clean result.
No. A 301 redirect done right protects your SEO. It is the correct way to move a page, and Google treats it as a clear signal to transfer ranking power to the new address. What hurts SEO is the alternative: deleting a page with no redirect, leaving visitors on a 404, and letting old links point nowhere.
A redirect can cause a small, short dip in traffic while Google processes the change. That is normal, and traffic usually returns within a few weeks as the new page takes over the old page’s place in search results. If traffic does not come back, check for chains, loops, or a redirect to a page with a different topic.
Yes, when the move is permanent. A 301 tells Google to pass ranking power to the new page and to replace the old URL in search results. A 302 tells Google the move is temporary, so the old page keeps its ranking. Use a 301 for permanent moves and a 302 only for short-term ones.
Use a 301 for normal pages. A 308 is only needed when a form or an API request must keep its POST data through the redirect. For links, pages, and site moves, a 301 is the standard choice.
A 301 redirect means the page moved for good, and a 302 means it moved for now. A 301 passes ranking power to the new page and Google updates its index. A 302 keeps the old page in the index and does not pass ranking power.
A 307 is a temporary redirect that keeps the request method unchanged, and a 308 is a permanent redirect that does the same. They matter mainly for forms and APIs. For regular web pages, 301 and 302 cover nearly every case.
Yes. You can point the old URL to a different page, or remove the redirect. But browsers cache 301 redirects, so some visitors may keep following the old one for a while. Change redirects only when you have a good reason, and test in a private window after the change.
There is no fixed limit, but keep them tidy. Hundreds of redirects are fine on a large site. What matters is that each one points to a live page, that there are no chains or loops, and that your own links point to the final URLs instead of the old ones.
A 301 redirect is a simple tool with a big job: it moves a page for good without losing the visitors, links, and rankings the old page earned. Use it when a page moves, a site changes its domain, or old content gets a better home. Match the new page to what visitors wanted, test the redirect in a private window, update your links and sitemap, and leave the redirect in place. Do that, and a URL change becomes a quiet improvement instead of a traffic problem.

A bad robots.txt file can hide your whole site from Google. This guide shows how to test it in Search Console, check single pages, and avoid the most common mistakes.

Verification proves to Google that you own your site. This guide walks through the DNS record, HTML file, HTML tag, Analytics and Tag Manager methods, and what to do when verification fails.

A canonical tag tells Google which version of a page is the main one. Learn what it is, when to use it, and how to add and check it in WordPress.