Problems

Difference between Jekyll and Hugo

I have changed my blog’s framework from Jekyll to Hugo. The big difference is… the address of each page is slightly different. Jekyll just shows the filename. On the other hand, Hugo shows the directory path of each post file.

Jekyll Hugo
junchive.kr/2024-01-05-404-page junchive.kr/posts/blog/2024/404-page

Google SEO already knows some of my posts

The problem is… Google Web AI already knows some of my posts, and now the web address is heading to somewhere that doesn’t exist. This is a big problem, because people who came to my blog by google search, will be annoyed by 404 page.

Solutions

Auto redircting to homepage

Easiest way to solve this problem is auto-redirecting to the homepage. After 2 seconds entering 404 page, the user will be sent to ‘junchive.kr’ homepage. User can find what they wanted, or search for something else.

How to?

Using meta tag is the shortest solution. Other than that, you should use JS to solve this problem. Meta tag is easy peasy. Just put the following code into 404.html page on your site!

<meta http-equiv="refresh" content="2;url=https://junchive.kr/" />

References