301 redirect via .htaccess file

Setting up a 301 redirect via .htaccess file can be done as follows:

First, check if hidden file preview is turned on (.htaccess is a hidden file, like any file that has . at the beginning of its name):

  1. Log in to cPanel
  2. Open the File Manager application
  3. Click on the Settings option in the upper right corner of the screen
  4. In the window that opens, check the option Show Hidden Files (dotfiles)

Then insert the following line into the existing .htaccess file:



Redirect 301 / https://address-to-redirect-to.com/



Note
  • Instead of "address-to-redirect-to.com" type the address you want the domain to redirect to.
  • If there is no .htaccess file on your hosting, you need to create it
  • redirekcija
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How many domains can I register?

There are no limits. You can register as much domains as you want. 

How to change hosts file?

If you want to look at your site with our server, and your domain is inactive or directed to...

Is additional documentation required when registering a domain?

To register any domain name, no additional documentation is required. Depending on whether the...

Can you preregister a domain before I pay?

No, domains cannot be preregistered - domains can only be registered. We register a domain for...

How can I point my domain to AdriaHost?

To point your domain to AdriaHost, you will need to change your domain nameservers. You can...