301 Redirect

This code will redirect all visitors who attempt to access the old-url.html page to the new-url.html page. The 301 code tells the browser that this is a permanent redirect.

To add the redirect, add the following code to your public_html/.htaccess file..

You may access your .htaccess file using any standard FTP program or through your control panel with our services via the "File Manager" icon.

 

To use File Manager, please open File Manager in your control panel with our services. Navigate to the public_html folder by clicking on the public_html text. Click "Settings" in the upper right corner and enable "Show Hidden Files" then save.

Click on the .htaccess file then click the "Edit" button. Edit the .htaccess file and add the following code to the very bottom and save.

If the .htaccess file does not exist in your public_html folder you can create one from scratch using File Manager's +File button. Name the file .htaccess

 

  1. Open the .htaccess file
  2. Copy the following line of code into the file. Replace http://www.example.com/ with the URL you wish to forward your domain name to...
Redirect 301 / http://www.example.com/

 

Once you have completed these steps, any visitors who attempt to access the old URL will be redirected to the new URL. A 301 redirect is a permanent redirect, which means that search engines will update their records to reflect the new URL. This will help to ensure that your website's traffic is not lost when you make changes to your URLs.

 

Here is an example of a 301 redirect for a website with the domain name www.example.com:

 

Redirect 301 /old-url.html http://www.example.com/new-url.html

 

  • 2 Users Found This Useful

Was this answer helpful?

Related Articles

When should I use ascii and when should I use binary?

Many FTP client programs support and auto mode to detect the proper upload type based on file...

I can not get the transfer authorization email can it be forwarded to a different email address?

The authorization has to be authorized by the registered contact for the domain. We cannot change...

Error 508 / 503 - Resource Limit Reached

To help maintain the stability of servers and keep websites fast, UltraWebHosting has resource...

Redirect http to https and www

To forward a website to use both www. and https:// use the following in an .htaccess file:...

How can I change the default page / document?

Create a .htaccess file, include the below information into it and upload it to the public_html...