This tutorial will provide you the best way to redirect users forcefully to https:// URL with www domain prefix. For example, your domain name is, Below configuration will forcefully redirect users to in all ways. Let’s edit Nginx virtual host configuration file: and add the below content. change with your actual domain name. Also, add any other required settings specific for your Virtual host. After making the change to the configuration file, restart your Nginx web server and try to access your domain like URLs. In all the conditions, this will be redirected to