Ahrefs is an SEO tool that identifies issues on your websites, like broken links, missing alt-text, and more. When I first ran the tool, my site got a 44/100 😭
Here's a screenshot of the problems Ahrefs encountered on blogthedata.com
Alt-text, H1 tags, meta descriptions/titles
These were pretty straightforward fixes. Images should have alt-text for non-sighted users, and every page should have an H1 tag as the main header.
Meta descriptions and titles are meta tags in <head> are used for social media previews and search engines. I needed to finesse mine to ensure they were in the Goldilocks zone, not too long or too short!
Duplicate Pages Without Canonical
Search engine crawlers treat the same URLs as duplicates if your site supports 'www' and no 'www' (known as the 'apex' domain). For example,
Technically, both of those are on separate domains, so I was getting flagged for duplicate content. To resolve this issue, I found this article by Cloudflare, which walks you through how you can set up bulk redirects, so anyone visiting a 'www' URL gets redirected to one without www (I think it looks cleaner, anyway!)
After implementing bulk redirects, my score skyrocketed to 92/100.
Removing the remaining duplicate pages
I wasn't entirely done. I still had 27 pages that were flagged as duplicates. The issue was that the way I was doing pagination resulted in duplicate content. For example,
Had a lot of the same headings, meta tags, and text as:
I found a few solutions, but I didn't like them. I thought this would be an excellent opportunity to implement infinite scrolling with htmx so I could do away with pagination. You can reach more about that implementation in the linked post above, but the result was that my duplicate pages went down to ZERO!
Ahrefs is an excellent tool in your SEO toolbox. I resolved hundreds of errors that improved my site's SEO, accessibility, and performance. Take your site for a spin through Ahrefs and improve your website health!