30 redirects not working

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.

Here are the contents of my _redirects file:

/helped/                                https://superfriendly.com/work/
/helped/*                               https://superfriendly.com/work/
/glossary/                              https://superfriendly.com/design-systems/
/classes/                               /classes/make-design-systems-people-want-to-use/
/tools/                                 https://superfriendly.com/design-systems/
/tools/*                                https://superfriendly.com/design-systems/
/podcasts/                              https://superfriendly.com/design-systems/
/podcasts/*                             https://superfriendly.com/design-systems/
/books/                                 https://superfriendly.com/design-systems/
/books/*                                https://superfriendly.com/design-systems/
/talks/                                 https://superfriendly.com/design-systems/
/talks/*                                https://superfriendly.com/design-systems/
/articles/                              https://superfriendly.com/design-systems/articles/
/articles/*                             https://superfriendly.com/design-systems/articles/:splat
/about/                                 https://superfriendly.com/about/
/contact/                               https://superfriendly.com/hire-us/
/privacy/                               https://superfriendly.com/privacy/
/hall-of-justice/                       https://superfriendly.com/
/purpose/                               https://superfriendly.com/
/rss/index.xml                          https://superfriendly.com/
/tools/diagnostic/                      https://diagnostic.superfriendlydesign.systems/
/classes/design-systems-101/            /classes/design-systems-with-superfriends/
/_design-system/                        /hall-of-justice/
/_design-system/*                       /hall-of-justice/:splat
/articles/superfriendly+covid19/        /articles/superfriendly-covid19/
/classes/design-systems-cohorts/        /classes/design-systems-study-hall/
/classes/design-system-cohorts/         /classes/design-systems-study-hall/
/classes/design-system-study-groups/    /classes/design-systems-study-hall/
/classes/design-systems-study-groups/   /classes/design-systems-study-hall/
/work/                                  /helped/

Any help would be appreciated. Thanks!

hi there dan, thanks for following us over here! question: did these redirects recently work?

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.

thats helpful. thanks! let me go see if i can get you some more information.

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 :man_shrugging:

that’s helpful too! we are investigating. Stay tuned, i will update you when i know more. :pray:

1 Like

hey dan,

could you share your toml and redirects file contents with us? we’re still investigating. thanks/!!

I am wondering if the _redirects file is in the wrong location in the repository @danmall

1 Like

good insight @coelmay . can you verify, @danmall ?

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?

If I navigate to https://superfriendly.com/helped/ should redirect to https://superfriendly.com/work/?

Forcing is only required if there is actual content at the original location.

You can force in _redirects too, using a ! e.g.

/from/    http://www.example.com/to/    301!

This is post-build or pre-build?

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.

Ah, good to know! Thank you!

Both.

Hey @danmall,

Did you try forcing the rules in the _redirects file as suggested?