Domain ALIAS for Redirect Rules


I have a question given the following scenario…

I have my primary domain and redirect domain which are as follows:

What I’d like to do is have a subdomain of mine redirect traffic to another website. When I say website, I mean domain with a specific path, not just the root level domain.

Here is the example I have in my netlify.toml file:

    from = ""
    to = ""

What is the appropriate way to include the newsletter subdomain? I tried adding it as an ALIAS, but I believe because it was part of the same root domain, I was receiving ANAME errors in my SSL configuration. I tried adding it as a CNAME that pointed at my root domain, but the redirect rules seem to be ignored.

If I want to use redirect rules, how should the subdomains be added?


That’s the correct syntax, @nraboy. As mentioned in your helpdesk case on the same topic, it will work fine once:

  • you have configured DNS for that hostname (we do this automatically for you when you do the next step, in case you use our DNS and have no conflicting definition predefined):
  • you have configured your site to host that domain (so, you add to the site’s Domain settings, as either a custom domain or domain alias)
  • our SSL certificate covers that domain (again intended to happen automatically once configured, assuming the prerequisites around DNS preconfiguration are met)
  • you have deployed those redirects to the site in question.

So some one of those steps went wrong in your config. Any correctly formatted ALIAS, A, or CNAME record would work (in your case: you had an incorrectly formatted ALIAS record in your DNS settings, which would have prevented SSL and thus redirects from working for that hostname). There is no way to set an ANAME record in our DNS, but since you were more explicit about the errors in the helpdesk (“multiple A records”) as I told you there, that is a different problem, about DNS propagation not being completed yet.

So - the answer to your question is that any record type will do.