Redirect www domain alias to naked domain alias


I am using Netlify DNS for and, both of which are the same Netlify app. My goal is to redirect to, and to

Currently I have as my “primary” domain, and was automatically configured to redirect to (it says “Redirects automatically to primary domain” on my setting page).

I added both and as “Domain aliases” for I would like the same behavior as, specifically should redirect to

I found this page in the docs which says to create a _redirects file to the root of my site, presumably with this content:* 301!* 301!

Is it possible to achieve my desired redirect by modifying my Netlify DNS settings, or must I add the _redirects file? I didn’t have to add the _redirects file to handle my primary domain, so can I do the same for my alias?


1 Like

You must add the redirects file. The special automatic handling for www/bare domain ONLY applies to the primary domain. We treat every other name (aka domain alias) the same, with no special handling beyond getting added to your SSL certificate.

That redirect looks like what I’d recommend to you. Make sure it goes above any other redirect such as the one for single page apps (


Sounds good, thank you for your quick response!