Knowledge Base

How To Create a Permanent Redirect With .htaccess

Follow these steps to set up a permanent redirect for your website using the .htaccess file:


1. Login to your Control Panel or FTP

  • Access your website’s control panel or use an FTP client to manage files.

2. Open the File Manager or Connect via FTP

  • Navigate to the "File Manager" section in your control panel or establish an FTP connection.

3. Locate the public_html Directory

  • Go to your website’s main directory.

4. Edit or Create the .htaccess File

  • Open the existing .htaccess file or create a new one if it doesn’t exist.

5. Add the Redirect Code

  • Insert the following code to permanently redirect your website:
   # 301 Redirect is permanent. Replace domain.com with your destination domain.
   Redirect 301 / https://domain.com/

6. Save the File

  • Save the .htaccess file and refresh your website to see the changes.

Your website will now redirect visitors to the specified domain.

Please rate this article to help us improve our Knowledge Base.

0 0