Instead of using cname records use A records and add the following code within your Nginx configuration file:
return 301 https://yourwebsite.com$request_uri;
or
return 301 http://yourwebsite.com$request_uri;
Does this make sense?
return 301 https://yourwebsite.com$request_uri;
or
return 301 http://yourwebsite.com$request_uri;
Does this make sense?