Redirects not working despite _redirects file being in root of dist folder

Hi there,

I’m having some issues with Netlify redirects. I have a _redirects file in my build folder (using Eleventy). In there, I’m using the following rules to deal with legacy Wordpress et al RSS feeds and a few blog posts. If you try some of these, you’ll see they are 404’ing. What am I missing here? Any ideas? I’m stumped.

I can confirm the _redirects file is in my dist folder at a root level (eg with index.html)

/* /404.html 404

# Specific redirects for 404s

# Feed
/feed                   /journal/feed/feed.xml   301
/journal/feed           /journal/feed/feed.xml   301
/journal/feed/          /journal/feed/feed.xml   301
/journal/rss_1.0/       /journal/feed/feed.xml   301
/journal/rss_2.0/       /journal/feed/feed.xml   301
/journal/rss_atom/      /journal/feed/feed.xml   301

/journal/comments/five-simple-steps-to-designing-grid-systems-part-1/  /journal/five-simple-steps-to-designing-grid-systems-part-1/   301
/journal/comments/five-simple-steps-to-designing-grid-systems-part-2/  /journal/five-simple-steps-to-designing-grid-systems-part-2/   301
/journal/comments/five-simple-steps-to-designing-grid-systems-part-3/  /journal/five-simple-steps-to-designing-grid-systems-part-3/   301
/journal/comments/five-simple-steps-to-designing-grid-systems-part-4/  /journal/five-simple-steps-to-designing-grid-systems-part-4/   301
/journal/comments/five-simple-steps-to-designing-grid-systems-part-5/  /journal/five-simple-steps-to-designing-grid-systems-part-5/   301

I reckon it has something to do with that first line, which you don’t actually need. If you add a 404.html page to your site, it will be picked up and displayed automatically for any failed paths: Redirect options | Netlify Docs

1 Like