Track your backlinks for free with Google Sheets

I was recently asked if there was a solution to track links which have been built to someone's site. They wanted to be able to know if links were removed, altered or changed to nofollow. To my surprise, I found that there were a number of paid tools offering this service. It occurred to me that you could track your backlinks free using Google Sheets and the =importxml() function. Click here to use the link tracker.

The problem

Link building is hard and its time consuming. Its also expensive. The trouble is that once you've gone to all the effort to get a link, the webmaster can change or remove it at any time. This can be particularly frustrating if you've paid for the sort of links that Google doesn't like (you know who you are, don't deny it) and they put a nofollow attribute on it after you've paid the cash. Being able to easily track links and know when they change is important when maintaining a long term SEO strategy.

What is importxml?

Importxml is a function within Google Sheets that allows you to scrape data from any webpage that allows Google bot to crawl it using Xpath (checkout our Xpath guide to learn more). With a simple equation, you can import a wide variety of information, such as page titles, meta descriptions or headings directly into your spreadsheet. If it is present in the HTML, you can scrape it using this function. For this tracker, we will use 3 importxml call-ups: Extract URL of linked page - =importxml(importxml(URL,"(//a[contains(@href, '')]/@href)[1]")) Nofollow links - =importxml(URL,"(//a[contains(@href, '')]/@rel)[1]") Anchor text - =importxml(B2URL"(//a[contains(@href, '')])[1]") You don't need to know how each of these equations work, just click here to see the link tracker in action.

What are the limits?

So this is a completely free tool, so of course there will be limitations. First of all, when scraping a large number of URLs it won't work instantly. If you're tracking more than 50 links, it may be worth setting it up and returning to it later on or the next day once all the URLs have been crawled. Secondly, this tool only tracks the first link to your site from the page. If there are multiple links from the same web page that you want to track, you can duplicate the tab and change the [1] to [2] to track the 2nd link on the page and so on. Despite these drawbacks, this tracker will show you the status of links quickly, accurately and in real time!

Take it a step further with ahrefs and Supermetrics

Why only track links which you have manually added to the tracker yourself? With an ahrefs API you can load all your recently generated links directly into your spreadsheet and track their status easily using a tool like Supermetrics. For more information on how to integrate ahrefs into your spreadsheet, click here. Click here for a 14 day free trial with Supermetrics and fully automate your backlink tracking.