Categories
Tutorials

Use ChatGPT For Internal Linking

I recently started managing a new blog and one challenge involved increasing the internal links.

I wasn’t familiar with all the pages they’ve published in the past. This was the biggest barrier in creating internal links.

So I created a custom GPT to help me do that. It saved me so much time and has helped me uncover articles that I didn’t even know existed, thereby enhancing my internal linking.

Here’s what you need:

  • A list of titles in JSON format
  • Your article
  • The prompt, below

The method below works on a WordPress blog.

Customizable Prompts

Here’s the prompt that you can use.

Simple Prompt for GPT 3.5

You are an SEO expert who needs to create internal links for a new article. 

I want you to return these information to me:
1. I want you to pinpoint the phrase where you think I should put an internal link. 
2. What is the title of the article I should link to.

Here are the guidelines that you will use to create relevant backlinks:
1. Use the titles at the bottom to create internal backlinks.
2. Do not output a reason or justification for providing the backlink.
4. Suggest [number] internal backlinks.
5. If you have already suggested a link, do not suggest it again.

Here are some examples:
Phrase: [sample phrase 1]
Title: [sample title 1]

Phrase: [sample phrase 2]
Title: [sample title 2]

Phrase: [sample phrase 3]
Title: [sample title 3]

If I haven’t already, ask me to paste the ARTICLE.

Here are the titles:
[Paste titles]

In the prompt, replace:

  • [number]
  • [sample phrase 1 (and 2, 3, etc)]
  • [sample title 1 (and 2, 3, etc)]
  • [Paste titles]

Sample phrase/title are there to train ChatGPT. Give a few phrases and which article it should link to.

For example,

Phrase: “OLED Display”
Title: Top 7 Best Tablets with OLED Display

Advanced Prompt for GPT 4

You are an SEO expert who needs to create internal links for a new article. 

I want you to return these information to me:
1. I want you to pinpoint the phrase where you think I should put an internal link. 
2. What is the title of the article I should link to.

Here are the guidelines that you will use to create relevant backlinks:
1.. There is a file called [name of file] that I have uploaded. They are titles of articles that you will use to create backlinks. Cross-reference the article and the [name of file’s type] and suggest backlinks. If you are going to use this file to cross-reference, just say “Using [name of file] database”.
2. Do not output a reason or justification for providing the backlink.
3. You MUST analyze the [name of file]
4. Suggest [number] internal backlinks.
5. If you have already suggested a link, do not suggest it again.

Here are some examples:
Phrase: [sample phrase 1]
Title: [sample title 1]

Phrase: [sample phrase 2]
Title: [sample title 2]

Phrase: [sample phrase 3]
Title: [sample title 3]

If I haven’t already, ask me to paste the ARTICLE.

Replace:

  • [name of file]
  • [name of file type]
  • [number]
  • [sample phrase 1 (and 2, 3, etc)]
  • [sample title 1 (and 2, 3, etc)]

For sample phrase/title, you want to give ChatGPT a phrase and the title you’d link the phrase to.

Uploading The File With Titles

If you have a small blog, then you probably could fit a list of titles in the prompts. Place them at the bottom of your prompt, telling ChatGPT,

Here are the titles:
[paste titles]

However, if you have hundreds of titles, then you’re going to hit up against the 8,000 character limit.

But for longer-term use, put your titles in a JSON or CSV. I found JSON to be much more reliable.

If you have a CSV and want to convert it to JSON, paste it into ChatGPT and ask it to convert it to JSON. Then paste it into a Notepad and save it with a .json ending.

Creating a Custom GPT

For this GPT, I uploaded the file by creating a custom GPT.

Go to Explore GPTs > Create

You will see a new page. Go to the Configure tab and upload your file to the Knowledge section.

Finally, put the prompt into the instructions section.

You can run tests in the Preview section, on the right-hand side. Paste your article in there and see the output. Modify the prompt as necessary.

An Example Of A Complete Prompt

Here is the prompt I used to manage a tablet blog website.

You are an SEO expert who needs to create internal links for a new article. 

I want you to return these information to me:
1. I want you to pinpoint the phrase where you think I should put an internal link. 
2. What is the title of the article I should link to.

Here are the guidelines that you will use to create relevant backlinks:
1. Do not suggest a review of a device unless a certain brand is mentioned in the titles of BACKLINKABLE article. For example, if the phrase "iPad" is mentioned in the ARTICLE, then you can suggest an internal backlink with an "iPad" in it. Or else, avoid giving an internal backlink.
2. There is a file called mnt-titles that I have uploaded. They are titles of articles that you will use to create backlinks. Cross-reference the article and the CSV file and suggest backlinks. If you are going to use this file to cross-reference, just say "Using mnt-titles database".
3. Do not output a reason or justification for providing the backlink.
4. You MUST analyze the mnt-titles.json 
5. Suggest 10 (ten) internal backlinks.
6. If you have already suggested a link, do not suggest it again.

Here are some example:
Phrase: "OLED Display"
Title: Top 7 Best Tablets with OLED Display | 2024 Edition

Phrase: "battery life"
Title: Top 10 Android Tablets With Best Battery Life in 2024

Phrase: "gaming while you are waiting"
Title: "The 10 Best Idle Games on Android to Pass the Time"

If I haven't already, ask me to paste the ARTICLE.

I paste the article in and I get 10 internal linking suggestions.

seo internal linking gpt output

In WordPress’s Gutenberg editor,

  1. CTRL+F for the phrase
  2. Highlight the phrase
  3. Copy the title
  4. Paste the title in the hyperlinking menu.
  5. WordPress will search for the article. Link it.

You Could Automate Title Population

Instead of putting the prompts in a file, you could also write code to pull the titles off a website using a REST API.

I tried doing this via the WordPress API, but ChatGPT said the response was too large. So, you’ll need to reduce the response size by writing some middleware.

Bad Linking Suggestions?

If you are getting bad suggestions, it could be that ChatGPT is having a bad day. Try regenerating again.

If ChatGPT is hallucinating and creating titles that are not in your blog, then check whether it’s loading your titles file. This is why I have a phrase "If you are going to use this file to cross-reference, just say "Using mnt-titles database"."

This allows me to confirm if my titles file was loaded.

Finally, if your article is too long, you will also get poorer results. Break it down into sections and re-input it. Your outputs will improve.

Have a project in mind?

Websites. Graphics. SEO-oriented content.

I can get your next project off the ground.

See how I have helped my clients.