AI SEO Internal Linking Tool: Build a Free Link & Authority Link Automator with Google AI Studio

Last Updated Date: March 26, 2026

TLDR:

Alston mentions he will provide the full prompt in the video description (as a document/doc). This is the core prompt used in Google AI Studio to build the entire Link Whisper AI tool. It includes:

  • Creating/managing multiple projects (websites)
  • Inputting sitemap URLs
  • Discovering internal linking opportunities for a given article URL
  • Finding contextually relevant internal links from the knowledge base
  • Finding authority/external links (nofollow, target=_blank)
  • Injecting all discovered links into the HTML source code with one click
# Build LinkWhisperer AI - Internal Linking SEO Tool

## Core Objective
Build a professional SEO tool called **"LinkWhisperer AI"** that analyzes a target page's
content and recommends high-value internal linking opportunities by matching the content
against indexed sitemaps using AI.

---

## Key Features

### 1. Project & Sitemap Management
- Allow users to create and manage **"Projects."** Each project contains a list of XML sitemap URLs.
- Persist projects and the active project selection in `localStorage`.
- Implement a background fetcher that parses XML sitemaps to extract all page URLs.
- Show real-time status (`Idle`, `Fetching`, `Success`, `Error`) and URL counts for each sitemap.

### 2. Analysis Engine (Powered by Gemini AI)

**Input Modes:**
- Support both **"Target URL"** (fetching content via a crawler) and **"Raw HTML"** input.

**Internal Link Discovery:**
- Use Gemini to analyze the target page's text.
- Compare the semantic themes of the text against the list of URLs from the indexed sitemaps.

**Recommendation Logic:**
For each opportunity, the AI should provide:
- The suggested **Anchor Text** found in the original content.
- The most relevant **Internal Target URL** from the sitemap.
- A **Context Snippet** showing where the link should be placed.
- A **Reason/Relevance** score.

**Authority Links:**
- A separate analysis to suggest high-authority external links (e.g., Wikipedia, .gov, .edu)
  that complement the content.

### 3. User Interface & Experience

**Design Style:**
- Use a **"Technical Dashboard"** aesthetic (clean grids, monospace data values,
  professional slate/zinc color palette).

**Results Table:**
- A sortable table to review all link opportunities with actions to **"Preview"** or **"Copy."**

**Link Injector:**
- A feature that shows a **"Before vs. After"** preview of the paragraph with the suggested
  link injected into the text.

**State Management:**
- Handle loading states with spinners and provide clear error messages for failed fetches
  or AI timeouts.

---

## Technical Stack
- **Frontend:** React (Functional Components, Hooks), TypeScript.
- **Styling:** Tailwind CSS (Utility-first).
- **Icons:** Lucide React.
- **AI Integration:** `@google/genai` (Gemini 1.5 Flash or Pro).
- **Data Handling:** Custom service for fetching/parsing XML sitemaps and cleaning HTML
  content for AI analysis.

---

## Design Requirements
- Use a sidebar or top-bar for **Project Management**.
- The main workspace should be split into **"Input/Config"** and **"Results."**
- Ensure the UI is responsive and uses `rounded-xl` borders with subtle shadows.
- Include a **"Demo" project** (e.g., using sitemaps from `advice.lk`) to show immediate
  value to new users.

---

## Implementation Tips for the Agent

### CORS Handling
> Fetching sitemaps directly from the browser often hits CORS restrictions.
> Implement the crawler service with robust error handling or suggest a proxy approach.

### Prompt Engineering
> When calling Gemini, provide a clear system instruction:
>
> *"You are an SEO expert. Analyze the provided text and find natural phrases that could
> link to the following list of URLs. Return the results in a structured JSON format."*

### Performance
> Indexing thousands of URLs can be memory-intensive; ensure the URL list is managed
> efficiently in React state.

---

## Demo Project Configuration (Pre-loaded)

```json
{
  "projectName": "Advice.lk",
  "sitemaps": [
    "https://advice.lk/post-sitemap.xml",
    "https://advice.lk/page-sitemap.xml"
  ]
}

Expected AI Output Format (JSON Schema for Gemini Response)

{
  "internalLinks": [
    {
      "anchorText": "long-term foreign workers",
      "targetURL": "https://advice.lk/long-term-foreign-workers-guide/",
      "contextSnippet": "...information about <a href='URL'>long-term foreign workers</a> in Sri Lanka...",
      "relevanceScore": 92,
      "reason": "The article discusses visa categories which directly relates to foreign worker guidelines."
    }
  ],
  "authorityLinks": [
    {
      "anchorText": "WHO healthcare system overview",
      "targetURL": "https://www.who.int/countries/lka/",
      "contextSnippet": "...according to the <a href='URL' rel='nofollow' target='_blank'>WHO healthcare system overview</a>...",
      "relevanceScore": 88,
      "reason": "Adds credibility to the health section by referencing an authoritative global health source.",
      "attributes": "rel='nofollow' target='_blank'"
    }
  ]
}

On-the-Fly Feature Request Prompt

When the built app was missing the ability to rename a project, he typed directly into AI Studio:

“I want the option to change or give project name to [project]”

This is an example of how you can iteratively add missing functionality by simply describing what you want.

He suggests prompting something like:

“I want you to find 10 authority links and make me select whichever the links which I want to use”

Or more broadly:

“Try to find like 10 to 20 links and give me an option to select whichever the links I actually want to use.”

He describes a prompt idea along the lines of:

“After finding all the links, after user selecting different checks, give an option to automatically paste in the HTML code and replace these links automatically without touching the code.”

You can copy this entire block and paste it directly into Google AI Studio’s system instruction field. The prompt covers all the features Alston demonstrated in the video – project management, internal link discovery, authority link suggestions, the HTML link injector, and the demo project pre-loaded with his advice.lk sitemaps.

Some people think SEO is mostly about writing content and “waiting for Google.” But if you want faster growth, higher relevance, and content that actually helps users (and search engines) navigate your site, then internal linking is one of the most practical levers you can pull.

In this guide, I’ll show you how to build your own AI SEO Internal Linking Tool that can:

  • Automatically discover internal link opportunities from your sitemap
  • Suggest contextual placements for links inside a specific page
  • Find “authority” external links (trust-building references) for the topic
  • Insert both internal and external links into your page using one-click HTML injection
  • Work for one site or multiple sites (via multiple projects)

This is not about flashy “AI magic.” It’s about building a simple, practical system that saves hours of manual work every time you publish or update content.

Table of Contents

Step 1: Understand internal linking (and why it matters more than you think)

Internal linking is the practice of linking from one page on your site to another page on your site. For SEO, it matters because it:

  • Helps search engines discover your content (especially newer pages)
  • Distributes authority across your site
  • Reinforces topic relevance by connecting related pages together
  • Improves user experience by guiding visitors to helpful next steps

And for content quality, internal linking should feel natural—like the link belongs in that exact sentence or section, not like a random list.

That’s the key: the best internal links are contextual.

When you’re doing this manually, it’s easy to miss opportunities. And when you update older articles, you might not remember which new posts should be linked from them.

This is where an AI SEO Internal Linking Tool becomes extremely useful: it turns your site structure into a knowledge base and matches relevant opportunities automatically.

Step 2: Know what your tool will do (the workflow in plain English)

Here’s the workflow of a practical AI internal linking tool like the one we’ll build:

  1. Create a “Project” for your website inside Google AI Studio’s generated app.
  2. Add sitemap URLs for that website (so the tool can learn your pages and their hierarchy).
  3. Paste a page URL (the page you want to add links into).
  4. Click Find internal links to get suggested internal targets and suggested contextual placements.
  5. Click to add authority external links (trusted references like major institutions, not random blogs).
  6. One-click insert into the page’s source HTML so your internal and external links are added automatically.

It’s essentially turning the boring part of SEO (finding link opportunities and adding them correctly) into a repeatable automation.

Link whisperer AI interface showing knowledge base and the option to find internal links for a target URL
Your tool interface shows the configured knowledge base (linkable assets from your sitemaps) and a “Find Internal Links” workflow for analyzing a target page.

Step 3: Prepare your site sitemaps (this is the “secret sauce” data input)

The tool relies on sitemaps to build a structured list of your linkable assets (posts, pages, etc.). You don’t need complicated scraping. You just need to provide the tool the correct sitemap URLs.

Most WordPress sites generate sitemaps automatically via SEO plugins such as:

  • Rank Math
  • SEOPress
  • Other SEO sitemap plugins

If you can’t find your sitemap URLs easily, you can install a plugin like:

  • XML Sitemap

Once your sitemap exists, you’ll typically find different sitemap sections such as:

  • Posts sitemap
  • Pages sitemap
  • Category or hierarchy sitemap(s)

In the tool’s project settings, you’ll enter the individual sitemap URLs (better results) so it can quickly locate link targets across your entire knowledge base.

Practical tip: gather sitemap URLs before you start building, because it will save you time when configuring the app.

Step 4: Decide how many sites you’ll manage (single project vs multiple projects)

One of the most convenient ideas in this system is that it’s built around projects. That means:

  • If you manage one website, you create one project.
  • If you manage multiple websites, you create multiple projects—each with its own sitemap URLs.

When you switch projects, the tool uses the correct knowledge base for that site, so suggestions stay relevant and accurate.

Screenshot of LinkWhisper AI showing an active project with sitemap-based knowledge base and a button to find internal links
In the LinkWhisper AI interface, your project loads with the knowledge base built from sitemap URLs—then you can analyze a live page to find internal link opportunities.

Step 5: Build your AI SEO Internal Linking Tool in Google AI Studio

Now we get to the part that most people find intimidating—but you don’t have to be a developer to do this.

You’ll use Google AI Studio to generate an app based on a prepared prompt. The tool is designed to include the necessary components automatically.

Go to:

https://aistudio.google.com

Then you’ll paste a full build prompt into AI Studio’s interface and click Build.

The approach is simple:

  • The prompt tells the system what UI pages to create (project setup, sitemap ingestion, link discovery, authority links, HTML injection, etc.)
  • The app uses Gemini AI for analysis and link suggestions
  • It optionally supports features like persistence and Google search data for authority link discovery
Example AI Studio build prompt text describing the internal linking tool workflow and context for link placement
Here’s an example of the kind of build prompt you’ll paste—complete with UI behavior instructions and details on using sitemaps to generate internal link placements.

Step 6: Paste the build prompt (and what “context” means)

The build prompt typically includes:

  • A description of the app’s goal (internal linking + authority links)
  • UI behavior instructions (what buttons do, what screens show)
  • Use of sitemaps to build a searchable “knowledge base”
  • One-click HTML injection behavior
  • A demo project name (so AI has an example to follow)

You can modify small details (like project name) if needed. But for best results, keep the overall structure intact.

After you paste the prompt, click Build.

Step 7: Choose optional settings (persistence, authentication, search data, reasoning mode)

AI Studio may show optional toggles before final app generation. The tool can be configured depending on what you need.

Common options mentioned in the build flow:

  • Persistent database: if you want the tool’s project data to remain consistent across devices and sessions
  • Authentication: if you want users to log in (useful for sharing with clients or a team)
  • Google search data: helpful for authority links because it can reference relevant sources found via search
  • Reasoning / Thinking modes: options like “Thinking more” or “Google Intelligence” to improve match quality (at the cost of time/compute)

If you’re building a local personal tool, you can skip persistence and authentication. But if you plan to share it or use it across devices, persistence can be worth enabling.

Step 8: Wait for the app to generate (it can take a few minutes)

Once you click Build, the system will generate files, metadata, and services. This may take anywhere from a couple minutes to a bit longer depending on load and complexity.

During generation, you might see messages like:

  • Created metadata
  • Server types
  • Site map ingestion setup
  • Gemini services and utilities

Just let it finish—then you’ll be brought to a generated interface similar to the tool you’re trying to build.

LinkWhisperer AI generated app showing New Project screen for managing sitemaps and indexed URLs
Before you run analysis, create or choose a project. This step is where your sitemaps and indexed URLs get organized for better link suggestions.

Step 9: Configure your project and add sitemap URLs

After generation, you’ll see a UI where you can create a new project.

Create a project and add:

  • Site name
  • Sitemap URLs

Important: the tool works better when you provide individual sitemap URLs (not just a vague top-level link). That gives it an accurate list of page types and hierarchy.

Once you paste the sitemap URLs, click Refresh so the app loads your site’s linkable assets.

Step 10: Fix errors if the app complains (it’s usually manageable)

Sometimes the generated app may show errors on first run. This is not uncommon in auto-generated builds.

The good news: in many cases you’ll see a button like Fix errors which automatically attempts to correct issues.

If your tool appears to be “not fully loading” but still scraping URLs, it might be a caching or display glitch rather than a real technical failure.

When you face a visual inconsistency:

  • Try a hard refresh
  • Clear browser cache
  • Re-run refresh after changes
  • Publish the app (sometimes deployment resolves edge-case UI issues)
Google AI Studio action history showing an error fix related to sitemap parsing in LinkWhisperer
If the auto-generated app throws errors, check the action history panel—this view helps you understand what was updated and what failed.

Step 11: Set up Gemini API key / free tier (so analysis can run)

When the tool tries to “discover opportunities,” it relies on Gemini AI. If Gemini is not connected, you may see prompts or warnings about missing API keys.

To proceed:

  • Connect the Gemini API key for your project
  • If needed, set up Google AI billing configuration
  • Use free tier while testing

In many setups, free tier allows low-volume testing without payment details being charged immediately. After that, costs are based on usage.

So don’t panic if you see mention of “free tier”—it’s part of the normal setup.

Step 12: Run link discovery for an article (the heart of the AI SEO Internal Linking Tool)

Now you’ll finally use the tool like a real SEO workflow.

Pick a page (ideally one you’ve already published) and paste its URL into the tool.

Then click:

  • Find internal link

The tool will go out to that page, read its content, and compare it against your site’s internal linkable assets from the sitemaps.

What you’ll typically get:

  • A list of internal pages that can be linked contextually
  • Suggestions about why each internal link is relevant
  • Often a sense of where in the article the link should be inserted

This is where the automation saves real time. You’re not hunting manually through your site; the tool does the matching.

LinkWhisper AI results showing linking opportunities with section context and anchor text suggestions
The tool returns a list of linking opportunities with section context and suggested anchor text—so you can place links where they fit naturally.

Internal links are important. But readers also benefit from external citations—especially when they’re pointing to trusted institutions.

So the tool includes a section called something like authority links.

How it works:

  1. You request authority links for the topic (the tool uses search)
  2. It finds relevant external pages from major sources
  3. It prepares them so they open in a new tab and include typical best-practice attributes

In the example flow, external authority sites include large organizations like:

  • World Health Organization (WHO)
  • World Bank
  • Other recognized sources (depending on the topic)

Why this matters: external links (when chosen carefully) can improve perceived credibility and help users verify claims.

And because it’s automated, you spend less time searching and more time writing.

AI SEO internal linking tool authority links list with external sources such as WHO and World Bank
Here are the authority external sources the tool prepared for your topic—examples include major institutions like WHO and the World Bank.

This is the feature that makes the tool feel like a genuine productivity system rather than “just another AI suggestion list.”

The tool provides an HTML code editor section. You paste the source HTML of your article and then click a button to insert the links.

When you do that, the tool replaces/updates link targets automatically:

  • It inserts the internal links into the correct text phrases
  • It inserts authority external links where relevant
  • It saves you from manual copy-paste and error-prone link formatting

After saving, you refresh to confirm the links were inserted correctly—for example, linking an internal keyword phrase to the internal page and inserting a third-party citation for credibility.

Screenshot of article body text in an editor with highlighted keywords for inserting internal and authority links
In this editor view, the body content and key phrases are shown—exactly where the tool inserts internal and authority external links.

In the base tool flow, you may get a certain number of suggestions (e.g., 5 internal links found). If you want broader coverage, you can adjust the tool behavior.

For better results, you can guide the tool with prompts like:

  • “Find 10 authority links and let me select the ones I want.”
  • “Find 10–20 internal links and score them so I can choose.”

This improves quality because you’re not forced to accept the first set of suggestions. You control what fits your content style.

Then you can proceed to HTML insertion once you confirm your selected internal and external link set.

Step 16: Use it for unpublished content (paste HTML when the page isn’t live yet)

Not every situation is “I have a live URL.” Sometimes you’re drafting or you haven’t published yet.

The tool can support this by allowing you to paste the content (e.g., source HTML) directly into the editor area. Then it can still:

  • Find internal link opportunities based on your sitemaps
  • Add authority links based on your topic context
  • Inject links into your HTML so you can publish with links already set

This is useful for workflow speed: draft → link-inject → publish.

Step 17: Publish or self-host (depending on how you want to use it)

Once you’re satisfied, you have several options:

  • Use it directly in the development environment
  • Publish it so you can access it via a URL
  • Download code and self-host it
  • Share it with another person/team member

If you want to publish, the tool typically asks you to select or create a Google Cloud project.

For first-time users, you may need to:

  • Create a Google Cloud project
  • Set up billing (it may still be low or near zero for test usage via free tier)
  • Select your project in the publish panel

Then click Publish URL.

After deployment, you can open the link in a browser and use your AI SEO Internal Linking Tool anytime without returning to the build interface.

Google AI Studio publish screen showing warning that billing is not enabled for the selected Google Cloud project
If your selected project doesn’t have billing enabled, Google AI Studio will prompt you to open billing settings before publishing.

Step 18: Internal linking best practices (so AI suggestions stay “SEO-correct”)

Automation is powerful, but the final linking decisions still matter. Here are best practices to keep your internal links safe and effective:

  • Keep anchors natural: avoid stuffing exact-match anchors everywhere.
  • Link to the most helpful page: not just any page with a keyword match.
  • Use topic clusters: connect related concepts and subtopics.
  • Prioritize important pages: money pages and foundational guides should receive more internal link attention.
  • Don’t overlink: too many internal links can reduce readability.
  • Use authority links selectively: external citations should support claims, not clutter the page.

In other words: let the tool suggest. Let your judgment decide what actually improves the reader’s experience.

Step 19: A quick example of how the tool improves a real workflow

Imagine you wrote a blog post about a term like “long-term foreign workers.” Later you publish a more specific guide about a “Sri Lanka digital nomad visa.”

Without automation, the internal linking job is manual: you’d have to remember the older post, search for relevant sentences, and then add the link with correct anchor text.

With an AI SEO Internal Linking Tool, the next refresh or run can detect:

  • That the newer guide is highly relevant to a phrase in your older post
  • That the internal link should improve user navigation
  • That adding an external authority reference can strengthen credibility

And with one-click HTML injection, the links can be inserted without tedious editing.

FAQ

How is this different from typical SEO tools that suggest internal links?

This approach builds a dedicated AI SEO Internal Linking Tool around your sitemaps and a one-click HTML injection workflow. Instead of just listing suggestions, it also helps you place internal and authority external links efficiently inside your content.

Do I need coding experience to build it?

No. The app is generated through Google AI Studio using a prompt. You mostly configure sitemaps and API access, then use the tool interface.

What do I need to provide for internal linking?

You provide sitemap URLs for your site. The tool uses those sitemaps to build its “knowledge base” of linkable pages and then matches link opportunities to the page you want to edit.

Can it work if my page isn’t published yet?

Yes. You can paste the page’s source HTML into the editor section, and the tool can still suggest internal and authority external links, then inject them into your HTML.

Does it automatically choose “authority links” like WHO and World Bank?

It searches for relevant authoritative sources for your topic and prepares them as external links (typically set to open in a new tab). The exact sites depend on your topic and search results.

Will this replace good SEO writing and content strategy?

No. It supports your content strategy by making internal linking and citation adding faster and more consistent. You still need to ensure the links you choose are relevant, natural, and improve user value.

What if the generated app shows errors or doesn’t look right?

Try using the app’s “Fix errors” button if available, and also attempt a hard refresh or clear browser cache. Sometimes it’s a visual/caching issue rather than a real failure.

Step 20: Final thoughts (build tools that make you better, not lazier)

AI can make people feel lazy—like they don’t want to do any work. But there’s another way to look at it: AI can remove the repetitive work so you can focus on the part that actually needs your brain.

An AI SEO Internal Linking Tool is one of those practical helpers. It saves time, improves internal linking consistency, and helps you add credible references without spending hours hunting for link targets.

If you manage multiple websites or keep publishing new posts regularly, this type of automation becomes even more valuable because your internal linking opportunities grow every day.

If you want to level up further, consider using this same tooling mindset for other SEO tasks too—like content drafting, outline generation, SERP analysis, and GitHub-based open source SEO systems.

You don’t need to be a big company to build something useful. You just need a clear problem, a simple data source (your sitemaps), and a tool that turns suggestions into real inserted links.

TABLE OF CONTENTS

Receive our Weekly Profitable SEO/SaaS Deals in your inbox

Subscription Form
Join over 2,000 subscribers
Senior Digital Marketing Manager BSF, SEO Expert & Teacher

Alston Antony is a Senior Digital Marketing Manager and SEO Expert with more than 15 years of experience helping businesses turn SEO into a predictable customer acquisition system. He holds an MSc in Software Engineering (Distinction) from the University of Greenwich and is a Professional Member of the British Computer Society (MBCS). As a practicing Digital Marketing Manager at BSF, Alston applies the same SEO strategies he teaches to real businesses, validating them in the field before sharing them publicly. More than 7,000 professionals follow him through his private community. He runs a YouTube channel with over 4,000 subscribers and has taught more than 20,000 students on Udemy. Alston created the BARS SEO System, which doesn’t just teach SEO theory. He engineers SEO systems that bring customers. His focus is always being the "Best SEO expert in India"

Leave a Comment