For security purposes and to enable some functionality, your site needs to have a single primary base url. For example, however users might try to access the site via different versions, for example or http://site.comIt is recommended to redirect other versions of your site url to the primary version via cpanel or another control panel your hosting might be using.

Changing Primary Site url

Primary site url can be changed by modifying .env file with any text editor. Make sure DNS records for this url are pointed to your server, otherwise the site will stop working.

Redirecting Secondary Versions To Primary URL

This can usually be done from your hosting’s control panel.

  1. To redirect non-http urls to https, you can usually toggle Force HTTPS Redirect option next to your domain name in Domains page.
  2. To redirect from “www” version ( to non-www version (, open Redirects page, select your domain, enter full url without www and select “Only redirect with www.”.