Domain redirect in netlify.toml


I am trying to redirect from the default Netlify subdomain to my own domain.

This is a Vue.js SPA.

I can get this working when I put the redirect rules in the _redirects file, however, when I move them to the netlify.toml file, it only partially works.

_redirects - Works* 301!
/* /index.html 200

netlify.toml - Partially works
If I go to it will redirect to
But if I go to, it does not redirect.

from = “*
to = “
status = 301

from = “/*”
to = “/index.html”
status = 200

Hi @drewkennelly, you’ll need to add the force=true to your domain redirect. That’s represented by the “!” in the _redirects version of the rule.

Thank you, it is working now.

1 Like