not to be confused, I'm not looking for backlinks check. I took over a site that has more than 10.000 redirects inside htaccess file.

Those redirects were made 2 years ago when the website platform was being changed. Now I want to clean up those redirects, but don't wanna lose any "juice" I still might be having from some sites.

Naturally, if I enter any redirect into the address bar it will redirect me to the current location, but how do I check if someone still somewhere is linking to me using the old URL?

I do have ahrefs and SEO powesuite in disposal, however, I can't find a way to find the info that I need.

Any ideas?

2 Answers 2


The important metric is not necessarily whether a website is still linking to your "old" URL, but whether that URL is still receiving any traffic.

Since these redirects have been implemented in .htaccess then the only way to reliably check this is your web server's access logs. The log entry will also potentially include the Referer, ie. the URL (website) from which the request was made.

Now I want to clean up those redirects

You might be able to drastically "clean up those redirects" without necessarily removing the redirect. Although this will depend on the old/new URL structures and to some extent how the redirects have currently been implemented.

It might even be easier/quicker/safer to "optimise" the redirect logic, rather than trying to ascertain whether a particular URL (or URL pattern) is still receiving traffic so the redirect can be removed (which is presumably what your initial goal was).

Aside: 10,000 "individual" redirects should never have been implemented in .htaccess to begin with. See:

(I'm sure there have been other related questions asked on this site with regards to 10K+ redirects and custom 404s, although I can't seem to find them?)

This could also be a way to "clean up" the redirects. By moving them to the WordPress 404 page/response. You could potentially run a script to convert the .htaccess redirects to a PHP array or database which is then looked up only as required (so not to impact normal site visitors).

  • This doesn't answer the exact question. It's a subjective observation that doesn't reflect an answer. The server log returns an IP and logs are not available on all servers, which doesn't help solving this problem.
    – Fra Citat
    Feb 17, 2023 at 13:52

You could search the log file for http status 301, which indicates a redirect. In Windows PowerShell

Select-String <filename> -pattern 'HTTP/\d\.\d" 301' | Select -ExpandProperty Line

does the trick. You could either inspect visually for the referrers, or you can search & replace the 301 code to 200, and feed the file into a weblog analysis software - most of them have a report on referrers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.