SHINE CORPORATION — SHINE ONE SHINE CORPORATION — SHINE ONE
Client login
← Linux

Add a Redirect Script to your .htaccess File

Updated 12 Oct 2026 · 47,643 views

This support article walks you through the process of adding a redirect to your .htaccess file.  You can use this script to redirect your site to www.domain.com or to a different domain altogether.

  1. Add the following code to your .htaccess file:

  2. Options +FollowSymlinks
    RewriteEngine on
    rewritecond %{http_host} ^domain.com [nc]
    rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

    Replace domain.com and www.domain.com with the your domain name and the destination URL respectively.

  3. Upload the .htaccess file to your web root or another appropriate directory.

Related

Still stuck?

Open a ticket