You can set up permanent redirects for static web pages. The key is not whether the file ends in .html, but whether the hosting environment can return an HTTP 301 permanent redirect status code for the old URL. Options include configuring .htaccess in an Apache environment that supports it, or setting up permanent redirects through IIS. If you do not have permission to change these settings, check with your hosting provider. A browser taking you to a new page does not, by itself, mean a 301 redirect has been set up.
Check your hosting environment before choosing a method
Before you begin, identify which server your site uses, whether you are allowed to configure redirects yourself, and which settings your current account can modify. Here are two approaches; the exact steps depend on your hosting environment:
- Apache: If your host supports .htaccess, you can add 301 redirect rules there to specify the new destination for each old URL. If it does not, contact your hosting provider first rather than assuming that uploading the file will make the rules take effect.
- IIS: You can specify a new URL in the server’s redirect settings and select a permanent redirect. If you use shared hosting without access to manage IIS yourself, you may need your hosting provider’s help.
awoo’s IIS instructions were published in 2011. They offer general guidance, but the tab names and steps may not apply to all current versions.
Map old URLs to new ones—not just the homepage
Once you have chosen a configuration method, clarify whether you are moving a single page, changing the entire domain, or changing the URL structure as well. This determines which old URLs need to point to which new ones.
For example, if your company information page has moved to a different path, redirect the old page to the new company information page. If you change both the domain and individual page paths, you need to map the URLs page by page. Redirecting the homepage alone does not mean the other old URLs have been handled. Work through these steps:
- List the old URLs that need redirects.
- Identify the new destination for each old page.
- Use a method your host supports to configure 301 redirects for the single-page or whole-site move.
Check the requirements before switching to a dynamic homepage
awoo’s 2011 article suggests another approach if your hosting supports server-side languages such as PHP or ASP: replace index.html with a dynamic homepage and add code that returns a 301 response. However, the article limits this approach to the homepage because the index filename can be omitted from its URL. All links back to the homepage throughout the site must also use the domain’s root URL consistently. This does not mean you can redirect every .html file the same way simply by renaming it.
A browser redirect does not necessarily mean a 301 response
Adding meta refresh to HTML or using JavaScript to send the browser to another page are both redirect methods. However, the browser changing pages does not, by itself, confirm that the server returned a 301 response. At the time, awoo also recommended combining meta refresh with canonical, but the article’s claims about how search engines interpret these elements are specific to that period and should not be treated as current rules. If you specifically need a permanent redirect, first confirm whether your hosting environment supports configuring a 301 response.
Permanent redirects for static web pages: perspectives from across the web
When switching to a PHP homepage, how do you explicitly set a 301 response?
If your host supports PHP, you can set the response in the dynamic homepage, for example by using header("Location: https://new-url", true, 301);, followed by exit(); to end execution. This code returns a 301 response from the server. Whether it is suitable for the original homepage URL still depends on the hosting and homepage configuration; it does not establish that other old pages have also been redirected.
Does using meta refresh with canonical amount to setting up a 301 redirect?
No. Combining meta refresh with canonical is not equivalent to setting up a 301 redirect. In 2011, awoo suggested this combination on static pages as an alternative when redirects could not be configured through server settings. However, using this method does not mean the server returns an HTTP 301 response. The article's claims about how search engines interpret these elements are specific to that period and should not be treated as current rules.
How are search signals handled after a redirect has been in place for a year?
Ahrefs cites a 2021 statement by Google's Gary Illyes: redirect signals are permanently consolidated at the new location after one year, measured from when Google crawls the redirect rather than simply from the date it was configured. The article describes the permanent transfer of signals from the original URL to the new URL as a theoretical outcome. This statement does not guarantee rankings or traffic, nor is it sufficient on its own to determine when a redirect should be removed.
References
- 301轉址怎麼做? 沒做好會造成網站流量大流失www.da-vinci.com.tw · 2024-03-01T21:20:47+08:00 — Discusses: When switching to a PHP homepage, how do you explicitly set a 301 response?
- [SEO技巧]靜態網頁如何正確設定301轉址(REDIRECT)?www.awoo.ai · 2011-02-16T03:54:36+00:00 — Discusses: When switching to a PHP homepage, how do you explicitly set a 301 response?; Does using meta refresh with canonical amount to setting up a 301 redirect?
- Is It OK to Remove 301 Redirects After a Year? We Tested Itahrefs.com · 2023-06-09T05:10:58+00:00 — Discusses: How are search signals handled after a redirect has been in place for a year?
