How to create a custom 404 page? #2480
Answered
by
SoumyaK4
lakshyaelite
asked this question in
Q&A
-
Checklist
How did you create the site?Generated from DescriptionI want to create a custom 404 page for my blog using this code: ---
layout: page
permalink: /404.html
---
<div style="text-align:center;padding:2rem;">
<h1>🤷 Oops! Page not found</h1>
<p>Looks like you've wandered off the map.</p>
<a href="{{ '/' | relative_url }}">← Take me back home</a>
<div style="margin-top:2rem;">
<img src="https://http.dog/404.webp" alt="404 Dog" style="max-width:100%; height:auto;" />
</div>
</div> Operations you have already triedI have tried creating both Anything else?I am getting these conflit errors every time I ren Conflict: The following destination is shared by multiple files.
The written file may end up with unexpected contents.
/workspaces/lakshyaelite.github.io/_site/404.html
- 404.md
- assets/404.html
Conflict: The following destination is shared by multiple files.
The written file may end up with unexpected contents.
/workspaces/lakshyaelite.github.io/_site/robots.txt
- assets/robots.txt
- /workspaces/lakshyaelite.github.io/robots.txt
...done in 15.775792981 seconds. |
Beta Was this translation helpful? Give feedback.
Answered by
SoumyaK4
Jul 25, 2025
Replies: 1 comment 1 reply
-
@lakshyaelite |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
lakshyaelite
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@lakshyaelite
Here's mine
https://github.com/SoumyaK4/SoumyaK4/blob/main/assets/404.html