Slugs start with a dot (.) leads to 404

I have migrated my company’s blog ( from WordPress to Hugo. It has some blog posts whose slug starts with a dot (.), as given below. They all lead to 404. I even have added aliases for these URLs that replace “.net” with “dotnet”. But they still lead to 404 (on the live server). However, on a local server (localhost:1313) the aliases work fine. I would also like to mention that on WordPress, these URLs were working fine.

Please guide how I can fix this issue. Thanks.

P.S. I am using the PaperMod theme.

Your problem lies within the server you are using. If it’s Apache there might be a rule that makes everything starting with a dot a “hidden” URL. Other server types might have similar rules. You might have to use a mod_rewrite rule to catch these occurrences and rewrite them before the html-redirect of Hugo itself comes in. The “dotless” URL should be canonical in any case.

1 Like


Thank you for your reply. The blog is hosted on AWS S3 Storage. Following is the screenshot of my GitHub Action file.