• Portal Home
  • Knowledgebase
  • Web Programming
  • How to redirect all website visitors to a subfolder of your domain

How to redirect all website visitors to a subfolder of your domain

To redirect all your visitors to a subfolder on your domain, for example www.domain.com to www.domain.com/shop:
  1. Create a file called .htaccess in your website's main folder (normally called public_html). With our Canadian web hosting service, you can create this file using the File Manager in your cPanel control panel.
  2. Open the file and add the following 2 lines:

    RewriteEngine On
    RewriteRule ^$ /shop [L]

  3. Replace the word "shop" with the name of your subfolder
  4. Save the file and test your website to make sure it works as expected
If you encounter any problems after having taken these steps, please get in touch with your support team.

Was this answer helpful?