How do you set up a 301 redirect on your web site?
How do you set up a 301 redirect on your web site?
if your site is hosted on a Linux Server you can use .htaccess for redirection
Redirect Old domain to New domain
Redirect to wwwCode:Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]
if your site is hosted on a Windows Server you can use IIS RedirectCode:Options +FollowSymlinks RewriteEngine on rewritecond %{http_host} ^domain.com [nc] rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]You can also use server-side scripting for redirectionCode:*In internet services manager, right click on the file or folder you wish to redirect *Select the radio titled "a redirection to a URL". *Enter the redirection page *Check "The exact url entered above" and the "A permanent redirection for this resource" *Click on 'Apply'
Thank you for the above advice.
The below code you gave above worked for me in an .htaccess redirect.
Jim B.
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]
In a shared windows hosting account that does not have direct access to IIS, you can create a redirect using your web.config file in the root of your website. Create that file and insert the code mentioned here:
http://myhosting.com/kb/Create_301_redirects_in_onCloud
-Jeremya
In a shared windows hosting account that does not have direct access to IIS, you can create a redirect using your web.config file in the root of your website. Create that file and insert the code mentioned here:
http://myhosting.com/kb/Create_301_redirects_in_onCloud
-Jeremya
an important point worth repeating twice
![]()