GoWebsite.com provides Domain Registration
Website Hosting, On-Line Shopping Carts, SEO
Blog Hosting, Email Accounts, Security Certificates,
Merchant Accounts & other Website Products.
Free setup! Speak with us anytime: 480-624-2500

Automatically Redirecting Visitors to HTTPS

If you have a secure certificate (SSL) on your website, you can automatically redirect visitors to the secured (HTTPS) version of your website to make sure your communications are encrypted.

How you do that depends on what type of hosting account you have (more info).

Windows

If your account uses IIS 6, you'll need to use a JavaScript redirect to direct visitors to the https version of your Website.

If you use IIS 7 or 8, you'll need to either create or modify your hosting account's web.config file. If you need to create one, see:

  1. Accessing Your Control Panel's File Manager — Create a file named web.config.
  2. Use the example from How To Create the Web.config File for an ASP.NET Application.

In the web.config file you create, you also need to add and tags, as well as close them ( and ), in the section.

To Automatically Redirect Visitors to HTTPS

  1. Using your hosting account's editor, open your account's web.config file.
  2. In the section, add the following code:
    <rule name="HTTP to HTTPS redirect" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="off" ignoreCase="true" /> </conditions> <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" /> </rule>
  3. Save your changes.

Linux

You'll need to either create or modify your hosting account's .htaccess file. If you need to create one, you can use your control panel's file manager (more info).

Add the following code to the .htaccess file:

RewriteEngine On
RewriteCond %{SERVER_PORT} !=443
RewriteCond %{HTTP_HOST} ^(www\.)?your domain name\.com$ [NC]
RewriteRule ^$ https://www.your domain name.com/%{REQUEST_URI} [R,L]

Where your domain name is your website's domain name. You will need to replace .com with your domain name's TLD.

You can also redirect specific folders off of your domain name by replacing the last line of the code above with:

RewriteRule ^ https://[your domain name]/[directory name]%{REQUEST_URI} [R,L]

Where [directory name] is the directory you want to use.

Important: If you have existing code in your .htacess, add this above where there are already rules with a similar starting prefix.

Domain Registration
Pay less for website domain names. Register your own .com, .net or .org for as low as $10.18 per year. Everything you need to get online - FREE with your domain.
Website Builder
For as little as $3.89 per month you can build your Website online with Website Builder using our easy to use professional templates.
Play Video - Demo
Quick Shopping Cart
Build and run your own successful online store in minutes. You're just five easy steps away!
Shopping Cart works with Google® and eBay®
Play Video
Website Hosting
Everything needed to give your website the high-performance home it deserves.  Protect transactions and secure your customer's data with
a SSL Certificate