Redirects has stopped working

I’ve been using a netlify.toml file to setup a simple redirect rule since january.

Now, the redirect stopped working. It’s the same build during all this months.

I deployed the same build again but the problem persists.

Can anybody help me?

Thanks

Hi, @guilhermebf, and welcome to the Netlify community site. :smiley:

I’m not sure what changed. My best guess is that the repo had been linked before October of 2019 and that it was “re-linked” or a new site was created with same repo. If so, the new monorepo behavior might be what changed:

Which Netlify site is this for? If you tell us, we can check the site and we will be happy to confirm if this is the issue or not.

The change with the monorepo support is that if there is a base directory defined in netlify.toml the build moves to that directory and restarts there.

This means any direct rules in netlify.toml in the base of the repo won’t be processed.

The solution for that is to copy (or make a symbolic link to) that netlify.toml file in the base directory as well.

You can also have two netlify.toml files. One with the just the base setting in the base of the repo and then the full netlify.toml in the base directory itself (which is some subdirectory of the base of the repo).

If this doesn’t resolve the issue, there are other questions, or if you want us to check the site to see what is happening - please reply anytime.

Hi Luke,

Thanks for your support. After some investigation, I’ve discovered a wrong configuration in my DNS provider.

The ip of my netlify default subdomain changed. So I had to reconfigure the redirection of any subdomain to the new ip.

Anybody knows another solution for this?

Hi, @guilhermebf, you we don’t recommend using an IP address for a Netlify site unless it is the DNS record for the apex/root domain and then it should be the IP address listed here.

For any other domain name, the solution is to use a CNAME record pointing to the subdomain at netlify.com. For example:

www.example.com.		1800	IN	CNAME	site-subdomain.netlify.com.

Would you please try that? If there are any questions or it doesn’t work as promised, please let us know.

Hi Luke,

That is exact my case! I have to configure the apex domain. I’ll follow the link’s instructions.

Thanks!

1 Like