Can we do URL rewrites?

Apologies for my incomplete understanding—but is there a way to do URL rewrites like in Apache or nginx? I need requests for “” to be turned into “” so it doesn’t break the same-origin policy for logins.

Thanks all :)))

I think this is something you would do in Nginx, or in your DNS config - it sounds like a problem for the hosting layer rather than the web framework.

Yes, it’s an nginx (or Apache) thing. You can’t actually do this with DNS (apparently).

My understanding is that a Meteor’s app’s HTTP server is the webapp package (as opposed to nginx or similar). So I’m not sure quite what to do.

But my problem is not unusual: I can’t serve my app from, only, because the OAuth providers are expecting only At the same time, I don’t want people who type in “www” to just be totally rejected, I want them to be redirected to What should I do?

it depends where you host. But most universal answer would be nginx :smiley:

Put nginx (with rewrite rule) in front of your Meteor app.

Any links on how exactly to do that? :wink: Particularly since I’m on Modulus…

I managed to use a 301 redirect served by my name provider to do what I wanted, but I’m still curious how you would use nginx with Meteor? Thanks all :slight_smile:

You would need to run your own box or spin up a VPS. Google “nginx reverse proxy meteor” - there are a lot of tutorials/guides on this :slight_smile:

Yep, found a few; it’s a good thing I’ve got the redirect working because I wouldn’t be able to set up an nginx proxy on Modulus. Thanks again y’all.