Automate Adding Internal Links to Pages With ChatGPT

2024 marketing trends


For my first Repeat Blog, I thought I’d jump straight into a quick tutorial on an internal linking method I came up with while using ChatGPT for SEO purposes, mainly for long-form blogs and articles for ourselves and our clients.

We know why using internal links in our content is essential- they, most importantly, allow Google to crawl the pages on a website. When implemented naturally, they also offer customers an organic form of targeted navigation within the website.

Good internal linking across all your pages is excellent SEO practice and a pillar in helping your site gain rankings where your content is helpful and relevant to the users served. Having links to your other pages makes sense in many ways, so why wouldn’t we try using ChatGPT for SEO purposes here?

If you’ve used a similar methodology to achieve the same or have any improvements that you’d offer, feel free to keep the conversation going on LinkedIn.

This works exceptionally best when you’re working on the odd blog or article here or there and isn’t a method that’s quite suitable for bulk workloads. For this, you’d probably have more luck implementing the OpenAI API into a custom spreadsheet (a tutorial for another day).

If you’re a Marketing Manager (you’re the bee’s knees), an Executive, or perhaps a Copywriter looking to add links to single pages quickly, this could save you a little bit of time and help you get into using ChatGPT for SEO or more expansive marketing efforts safely and effectively.

The Problem?

Let’s face it. If you’re working on an e-commerce website with hundreds or even thousands of links site-wide, an average SEO can’t remember them in their entirety, let alone implement the most relevant ones. We can search through sitemaps using our keywords, but it takes time.

Even if you’re working on smaller websites, time saved is time spent on more meaningful aspects of the overall site and its content offering or other areas of SEO to improve on.

We can use our sitemaps, ranking data, traffic metrics, copy relevancy and many more points of information to decide which links we would be going with, but this requires work to pull from different sources, especially if you’re in a rush or if you’ve just started to work for a client.

It’d be nice if some form of large language model could go ahead and add the sources of information together where relevant, right?

The Solution

We can use the words and copy on a page and ask ChatGPT to find similarities between keywords in the text and the content of the URLS we gave to it.

In the simplest terms, we give ChatGPT both our links and our page content, then let it go ahead and add the links where it’s relevant.

It’s honestly as quick as that. While it can be beneficial to read over the content multiple times in general, adding internal links shouldn’t ever be too long a process – unless you’re adding them in bulk!

Using ChatGPT to automate finding relevant link-words.

Input your site links or sitemap to ChatGPT

1. Feed ChatGPT your source of links. A lazier technique involves copying the whole sitemap in XML format and asking ChatGPT to extract only the URLs before providing you with a list of plain URLs.
However you go about it, you need to send your list of links to ChatGPT in the message box and ask it to utilise the links in the page text you’re about to provide to it.

[Prompt Example] “Here is a plaintext XML file containing website links from my sitemap, please extract the links and offer them to me in a list format. Here is the sitemap: (*Paste in your Sitemap.xml text from your XML file or files if you have more than one sitemap*).”

Input your chosen page’s copy to ChatGPT

2. Input the copy that you wish to edit. I highly recommend you send ChatGPT your final piece at this point and don’t ask it to edit it any further, as this can lead to issues with hallucinated links from the AI. If you’d like to use ChatGPT to change your copy or optimise it further for SEO purposes, it’s best to do this in a different conversation window and then add human touches afterwards. I’d specifically advise against posting ChatGPT-generated content directly to your website without some form of heavy moderation.

[Prompt Example] “Please utilise only the links from the previous list, and add internal links to the text provided for SEO purposes only where the text is relevant to the keyword. Here is the content that I’d like you to inject internal links into: (*Paste in your page content which requires internal links to be added*)”

Wait for ChatGPT to fuse the information based on semantic relevancy

3. Let ChatGPT add those links to your piece! As it’s generating your content, you can go ahead and check the links to make sure that they’re correct and that they’re relevant to the anchor text that’s been assigned.

Sometimes, ChatGPT can imagine the links added to the content or use broken links if they’re in the sitemap. You can merely ask ChatGPT to exclude those links in the copy.

[Prompt Example] “Please remove this link (*Paste in the URL you’d like to remove*) from the list of links used, and don’t include it in any copy.”


There are plenty of other ways to attempt this, utilising different or more purpose-built SEO tools for the job (ChatGPT for SEO purposes is still relatively new ground to tread).

Some plugins will look at suggesting internal links, some people use spreadsheets and external planners as a part of their workflow, and even some SEOs are using AI software to automatically add internal links where particular keywords are mentioned on a page.

Whichever way you like to speed up the process of adding internal links, this is a frankly simple method that I thought would be worth sharing as it’s novel and uses a somewhat trending tool. There are, however, massive caveats to using ChatGPT in these processes if you don’t moderate the responses.

If you’re worried about where the internal links are placed on your page, you could devise your own prompts to keep internal links in the primary content on the page. I’d say, judging from Google’s older Webmasters (now Search Central) commentary, the placement shouldn’t matter too much:


I hope you can use this super simple process to attempt to build more complex ideas and workflows using generative AI. You can teach the model how you like to write or specific criteria you’ve identified in an SEO checklist. You can then use it to help audit or moderate your content for tone of voice and your criteria (i.e. friendliness, readability, reliability).

If you tell ChatGPT to give you a meta description which utilises a specific keyword, stays under a character limit and is relevant to the content on a page (you can provide this content to ChatGPT), it’ll give you exactly that, so please experiment with your parameters and see what you can do!

If you found this useful or interesting and you’re looking for more content on the intersection of AI and Marketing, then look out for our next piece looking at and evaluating the use of ChatGPT-generated content matrices and how to use them to inform your content calendar (sneak peek below).

Subscribe for FREE below to stay in touch and receive the best PPC or SEO tips and tricks directly to your inbox.

Akash J Hashmi

Akash J Hashmi

With a background in Forensic Chemistry and Journalism, Akash moved onto SEO where he began to specialise. He's now taking charge of everything SEO as Repeat Digital's SEO Lead.

Contact Us

2 + 3 =