wiki:faq/domain/canonical-web-address

TranslatedPages

I have multiple domain names that point to my web site - how to I make it so my preferred domain always appears in the browser address bar?

Many of us have multiple domain names that point to the same web site. For example, you can access our web site by going to example.org, or www.example.org, or www.example.net, etc.

However, we want people to always see example.org in the address bar of the browser.

We do that by adding the following lines to the Web Config Settings in the Members Control Panel (click the Show Advanced Settings button to access the Settings field):

<If "req('Host') != 'example.org'">
    Redirect "/" "https://example.org/"
</If>

You can do the same by replacing example.org with the domain name you want your web site to display in the address bar of the browser. In this example, we are redirecting to an https site - be sure to enable https in the control panel if you are redirecting to an https site. Otherwise, redirect to http://example.org instead.

What if I want to force visitor of my website to use HTTPS?

In the Advanced section of the web congiration in the members control panel, there is a checkbox called "Redirect http" - ensure it is configured to redirect http traffic to https. You must enable https for this redirect to work.

Last modified 5 years ago Last modified on Apr 10, 2019, 3:12:14 PM
Note: See TracWiki for help on using the wiki.