Ahrefs Website Audit, additionally accessible as a part of the free Ahrefs Webmaster Instruments, means that you can search by way of the uncooked HTML code or the JS-rendered code throughout all crawled pages of the web site.
This function is especially helpful when you want to confirm analytics tags, establish pages that decision sure scripts or stylesheets, detect undesirable injections into the web page code, or analysis the opponents’ applied sciences.
You will need to perceive that within the period of JavaScript-powered web sites, the web page code can exist in two types:
Uncooked (Supply): the HTML code earlier than any JavaScript on the web page has been executed. That is what you see utilizing the “View Web page Supply” function within the browser.
Rendered: the ultimate HTML code after being altered/generated by JavaScript. It’s seen within the “Examine” mode within the browser.
The supply and rendered variations may be considerably completely different, so it’s vital to make sure you’re looking by way of the proper model of the web page code.
The right way to search by way of the rendered code of the pages
If you want to search by way of the JS-rendered HTML code of all of the pages on the web site, run a crawl in Website Audit or Ahrefs Webmaster Instruments. Make sure that the “Execute JavaScript” choice is activated within the crawl settings.
As soon as the crawl is full, go to the Web page Explorer and entry the Superior filter. Choose ‘Web page supply’ adopted by ‘Incorporates’ from the dropdown menu. Then, enter the precise piece of code you’re trying to find.
The instance above finds all pages on our weblog that that comprise an embedded desk.
The right way to search by way of the uncooked HTML of the pages
Looking out by way of the uncooked HTML (additionally known as supply HTML) requires a number of additional actions:
1. Disable JavaScript rendering within the crawl settings
2. Guarantee discoverability of all pages by the crawler.
That is essential for web sites the place web page content material (together with the inner hyperlinks) is generated by way of JavaScript, as AhrefsSiteAudit bot might not routinely uncover all pages by way of uncooked HTML code.
That’s why you want to provide the Website Audit software with a listing of enter URLs that we name “Seeds.”
The simplest method to do this is to guarantee that the Sitemaps are used within the “URL Sources.” If that’s not possible, use the Customized URL listing.
When the crawl is completed, use the superior filter to go looking by way of the supply code of all crawled pages.