Matomo Analytics

To make your domain listen on www.example.com instead of example.com you have to do the following steps. (Make sure you replace example.com with your own domain)

  1. Change the server_name variable inside your NGINX config. You can find this config file in this path (or you can use our UI to edit): /etc/nginx/sites-available/example.com
  2. (Optional): If you have SSL enabled, you will have to edit the redirect too. Open up this file: /etc/nginx/ploi/example.com/before/ssl-redirect.conf and edit these lines:
server_name example.com

TO 

server_name www.example.com

And

return 301 https://example.com$request_uri;

TO 

return 301 https://www.$host$request_uri;

3. After this, save these files and restart NGINX.

10 March 2019 (last updated 4 weeks ago)

2162 views

Back to Domains