Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ to = "/blog/:splat"
status = 301
force = true

[[redirects]]
from = "/404"
to = "/404.html"
status = 404

Comment on lines +41 to +45

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add force = true to ensure this rule overrides the existing /404 file

If Hugo outputs /404/index.html, Netlify will serve that file with 200 unless the redirect is forced. Without force = true, this rule may not apply, and the status will remain 200, defeating the PR’s objective.

Apply this diff:

 [[redirects]]
 from = "/404"
 to = "/404.html"
 status = 404
+force = true
🤖 Prompt for AI Agents
In netlify.toml around lines 41 to 45, the redirect from "/404" to "/404.html"
lacks force = true so it may not override an existing /404 file (e.g., Hugo's
/404/index.html) and Netlify could serve it with 200; update the redirect entry
to include force = true so Netlify will apply the 404 status unconditionally for
requests to /404.

[[redirects]]
from = "/*"
to = "/404.html"
Expand Down