Redirect requests over SSL => naked to www


#1

I do have an application deployed on meteot under www.myapp.com. When the client arrives on myapp.com, it redirects on https://www.myapp.com (because force-ssl). When it arrives on https://www… it’s already on its final destination. But what about https://myapp.com ?

I understand that we cannot redirect over SSL :

https://support.dnsimple.com/articles/url-redirect-ssl/

But it does not looks like it’s an edge case. I mean… a client arriving on the naked domain does not seems like something impossible.

So, how do I do that ? it says :

Instead of using URL forwarding you can use an ALIAS record,
A record, or CNAME record pointing to your host and then handle
a redirect in your HTTP server or inside your application.

Is there a package to do that ?


#2

Yes there is!
https://atmospherejs.com/wizonesolutions/canonical