Hi Netlify friends! I’m trying to redirect a few specific URLs on one Netlify domain (superfriendlydesign.systems) to different places on another Netlify domain (superfriendly.com). My Netlify deploy summary says “30 redirect rules processed without error,” but when I visit any of the URLs that are supposed to be redirecting, no redirecting happens.
Thanks perry! Yep, they worked before. I added the top 20 lines today. And now that I checked, it seems like the original 10 at the bottom are still working, but the 20 new redirects I added today aren’t. Hmm.
I seem to have it working now, but I’m not exactly sure why. The _redirects file doesn’t work, but when I moved the same rules to a netlify.toml file, it seems to work just fine
Yep! The _redirects file is in the root of my dist folder.
Here’s the contents of my netlify.toml file:
[[redirects]]
from = "/"
to = "https://superfriendly.com/"
status = 301
force = true
[[redirects]]
from = "/helped/"
to = "https://superfriendly.com/work/"
status = 301
force = true
[[redirects]]
from = "/helped/*"
to = "https://superfriendly.com/work/"
status = 301
force = true
[[redirects]]
from = "/glossary/"
to = "https://superfriendly.com/design-systems/"
status = 301
force = true
[[redirects]]
from = "/classes/"
to = "/classes/make-design-systems-people-want-to-use/"
status = 301
force = true
[[redirects]]
from = "/tools/"
to = "https://superfriendly.com/design-systems/"
status = 301
force = true
[[redirects]]
from = "/tools/*"
to = "https://superfriendly.com/design-systems/"
status = 301
force = true
[[redirects]]
from = "/podcasts/"
to = "https://superfriendly.com/design-systems/"
status = 301
force = true
[[redirects]]
from = "/podcasts/*"
to = "https://superfriendly.com/design-systems/"
status = 301
force = true
[[redirects]]
from = "/books/"
to = "https://superfriendly.com/design-systems/"
status = 301
force = true
[[redirects]]
from = "/books/*"
to = "https://superfriendly.com/design-systems/"
status = 301
force = true
[[redirects]]
from = "/talks/"
to = "https://superfriendly.com/design-systems/"
status = 301
force = true
[[redirects]]
from = "/talks/*"
to = "https://superfriendly.com/design-systems/"
status = 301
force = true
[[redirects]]
from = "/articles/"
to = "https://superfriendly.com/design-systems/articles/"
status = 301
force = true
[[redirects]]
from = "/articles/*"
to = "https://superfriendly.com/design-systems/articles/:splat"
status = 301
force = true
[[redirects]]
from = "/about/"
to = "https://superfriendly.com/about/"
status = 301
force = true
[[redirects]]
from = "/contact/"
to = "https://superfriendly.com/hire-us/"
status = 301
force = true
[[redirects]]
from = "/privacy/"
to = "https://superfriendly.com/privacy/"
status = 301
force = true
[[redirects]]
from = "/hall-of-justice/"
to = "https://superfriendly.com/"
status = 301
force = true
[[redirects]]
from = "/purpose/"
to = "https://superfriendly.com/"
status = 301
force = true
[[redirects]]
from = "/rss/index.xml"
to = "https://superfriendly.com/"
status = 301
force = true
Could the difference be that I’m forcing the redirect in the .toml file but wasn’t in _redirects?
Not quite! If you navigate to https://superfriendlydesign.systems/helped/ (old site), it should go to https://superfriendly.com/work/ (new site). That currently works, but I think because of netlify.toml, not _redirects.