How to redirect www to non-www using meteorup (mup) tool?

I have been trying to figure out how to redirect www to a non-www site. I am using meteorup (mup) for the deployment. However, I couldn’t see any configuration to do that in mup documentation.

My requirement is if someone enters should be redirected to

Note: I have also checked those old questions related to this topic and they are really helpful anymore.

Please input your views on this. Thank you.

I’ve done the following:

  1. Add a DNS CNAME record pointing www to
  2. In your mup.js config, add the following in the proxy section
proxy: {
    domains: ',',
    nginxServerConfig: './nginx.conf',
  1. Add a nginx.conf file next to your mup config, with the following:
if ($host != "") {
  return 301 $scheme://$request_uri;
  1. make sure you run: mup proxy setup

Hi @kimar ,

Thanks for sharing the answer. This resolved my issue. Thank you again.