How to Do an Auto Redirect to Indicate This Site Has Moved
- 1). Launch your FTP client and enter your domain name, user name and password in the respective file fields, or access your hosting control panel by typing its number code or extension (such as :8080 or /cpanel) after your web address according to your hosting company instructions.
- 2). Locate the index page or other page that you need to redirect in your website files on the remote panel of your FTP client or with the file manager of your hosting control panel.
- 3). Highlight the page file and launch the viewing and editing function of your FTP client or file manager from its menu or by right-clicking on the highlighted file name.
- 4). Add the following meta tag to the top of your page, line by line, without the outside quotation marks. Change the wording inside the parentheses to match the information for your new site and page:
"<html>"
"<head>"
"<meta http-equiv="Refresh" content="5;
url=http://(www.your new web address.extension)/(your new page name).(extension such as html, asp or php)">" (Replace the number 5 with the number of seconds for which you want the new address notice to appear - 3 to 5 seconds is recommended)
"<title>Address has changed!</title>" (Optional - use any text that indicates a change of address)
"</head>" - 5). Hit "Enter" and type the following line:
"<body bgcolor="#ffffff">" for a white background redirect page or select another color from a hexadecimal color chart in place of "#ffffff" if you wish to use a different background color. - 6). Hit "Enter" again and type the following or a similar message that contains all formatted addresses and commands and conveys a similar message. Replace all text in parentheses with the address and page extension for your new page:
"<h2>This page has moved! Please update your browser bookmarks! If you are
not automatically redirected within (your chosen number of) seconds,
please click here or go to <a href=(www.your new web address.extension)/(your new page name).(extension such as html, asp or php)">
http://(www.your new web address.extension)/(your new page name).(extension such as html, asp or php)</a></h2>" - 7). Hit Enter three or four times. Type the following line-by-line without the outside quotation marks to close the tag:
"</body>"
"</html>" - 8). Save your work and upload it back to the server via FTP or with your file manager upload and edit function. Enter the old address of the page and make sure it shows the redirection page before it transfers you to the new address. Check the text of the tag and edit as necessary in the event it does not work.
- 1). Launch your FTP client and enter your domain name, user name and password in the respective file fields, or access your hosting control panel by entering its number code or extension (such as :8080 or /cpanel) according to your hosting company instructions.
- 2). Check your list of files in the remote window of your FTP client or in your hosting control panel file manager to see if you have an .htaccess file in your root website directory. Open it for editing if you do have one. Launch a text editor such as Windows Notepad or the "Create new file" function of your control panel file editor if you do not have an .htaccess file.
- 3). Type the following line two lines below the last line of code in your existing .htaccess file or into your editor for the new file you are creating. Omit the exterior quotation marks and replace all text within parentheses with the information for your new site and page address:
"redirect 301 /(your old web address.extension)/(your old page name.extension such as .html, .php or .asp) http://www.(yournewaddress.extension)/(your new page name.extension such as .html, .php or .asp)"
Note that the old address should not be preceded with "http" or "www." - 4). Save your new file under the name ".htaccess" (omit the quotation marks) or save your edited .htaccess file. Upload it using your FTP client or the save and upload function of your file manager.
- 5). Test the redirect by entering the old address of your page. You should immediately see the page at the new address. Edit the file as necessary if the page does not appear.
Meta-Refresh Redirect
301 Redirect
Source...