Help Docs Control Panel Guides Cloud Sites Guide Website Management in Cloud Sites Redirecting URLs and Subdomains in Cloud Sites

Redirecting URLs and Subdomains in Cloud Sites

To ensure secure access to your website, use SSL to change HTTP to HTTPS, encrypting visitor information to protect it from hackers. After installing your SSL, set up URL and subdomain redirects to enforce HTTPS traffic.

Note:

The code provided below is only an example. Your specific website may require different code. Unfortunately, as outlined in our Terms of Service and Cloud Sites Spheres of Support Expectations, we are unable to help you troubleshoot code issues. We recommend speaking with your developer before implementing any scripts.

In order to allow your users to securely access your website, you must use an SSL. This changes the HyperText Transfer Protocol (http) to HyperText Transfer Protocol Secure (https). Using https helps keep your site visitor information safe from hackers by encrypting the information and making it difficult to translate. If you aren’t familiar with SSL’s check out our article What Is an SSL Certificate?.

Once you’ve purchased your SSL and it is installed on your site, you will need to use redirects for URLs and subdomains to force traffic through the SSL. Use the links below to select the script you need to redirect your URLs and subdomains.

Note:

The following scripts are for use on a site with Windows framework.

Forcing a Secure Connection (SSL) Using web.config in Cloud Sites

If your website has the IIS Rewrite Module available, you can use rewrite rules in your web.config file to force SSL on all pages. You can find more information on the IIS Rewrite Module on the Microsoft Knowledge Base.

Note:

Please contact our Support team if you are unsure if the IIS Rewrite Module is available for your site.

Forcing a Secure Connection (SSL) Using ASP.NET (Not MVC 3) in Cloud Sites

Using ASP.NET, you can run similar code to force SSL on a single page on your site.

Forcing a Secure Connection (SSL) Using ASP.NET (MVC 3) in Cloud Sites

You can use the RequireHttps attribute to decorate actions within your MVC application.

Redirecting URLs using Classic ASP in Cloud Sites

Use classic ASP to force SSL on a page on your site.

Note:

The following link is for a site with a Linux framework.

Redirecting URLs Using htaccess

You can force SSL with PHP on your Linux framework website.

Now that you’ve seen how to redirect URLs to use your SSL, find out how to redirect subdomains in our article Redirecting Subdomains using ASP and ASP.NET in Cloud Sites.

Was this article helpful?