Blog

How to get the list of not found pages on nginx

CN Camilo Nova Camilo Nova

Camilo Nova

CEO
1 min read.

You can get the list of not found pages (404) grouped by URL on nginx (ubuntu) running this command on the console:

sudo awk '($9 ~ /404/)' /var/log/nginx/access.log | awk '{print $7}' | sort | uniq -c | sort -rn

Useful when setting up redirections when you migrate to a new website.


Written by Camilo Nova

CN Camilo Nova Camilo Nova

Axiacore CEO. Camilo writes thoughts about the intersection between business, technology, and philosophy

Subscribe to our newsletter here:

Learn how to use technology to get back your time and enjoy an empty calendar on a work day.

We respect your inbox. Privacy policy

Wait. There's more:

Trust your instincts

It’s wild how every idea is open for debate these days. In the name of feedback, people feel entitled to offer opinions

1 min read.

Build to
Inspire