NEWOur agents now make the SEO fixes on your site and check what worked →

Connect a Custom-Coded Site Through GitHub (Next.js, Astro, Hugo, HTML)

Updated

If your site is built with code, connect the GitHub repository it deploys from. In Connections, click Add Connection on the GitHub row, then Continue with GitHub, install the SEOmatic AI app on your repository, and pick it. Each fix you approve arrives as a pull request. For page changes SEOmatic merges it for you, unless you untick Let SEOmatic merge its own changes; code changes always wait for you to merge them.

Is This the Right Connection for You?#

  • Yes if your site is built with Next.js, Astro, Hugo, Jekyll, Eleventy, Gatsby, Docusaurus, Nuxt, Contentlayer, ASP.NET Core or plain HTML, and its code lives on GitHub. It does not matter where it is hosted (Vercel, Netlify, Cloudflare Pages and so on).
  • No if your pages are written in a content system like Contentful, Sanity, Strapi or Payload. Connect that instead: see connect other platforms.
  • No if your code is on GitLab, Bitbucket or only on your computer. SEOmatic cannot write there yet. See no integration for your platform yet for what still works.

Connect Your Repository#

  1. In the sidebar, under Setup, click Connections. On the GitHub row, click Add Connection.
  2. Read what the agent can do, then click Continue with GitHub.
  3. On GitHub, install the SEOmatic AI app. Choose Only select repositories and pick the repository that holds your website. The app asks for access to code and pull requests on that repository only.
  4. Back in SEOmatic, under Repository that holds your website, click your repository.
  5. In Live site URL, type your public address, like https://yoursite.com.
  6. Leave Let SEOmatic merge its own changes ticked if you want approved page changes to go live without a trip to GitHub. Untick it to merge every pull request yourself.
  7. Click Connect repository. A message says GitHub connected. The agent now delivers edits as pull requests.

SEOmatic then maps which file builds which page. Your agents plan their first fixes once that map is ready. You need write access to the repository: repositories you cannot push to are greyed out with You need write access to this repository.

Blog or pages stored in a database (Supabase or any Postgres)? On your GitHub card in Connections, click Connect database. Your agents then publish articles as rows and edit those pages' title and description in place. See connect a Supabase or Postgres database.

Every change is a pull request first

SEOmatic never commits straight to your main branch. Each change is a pull request on its own branch, which you can read on GitHub. To stop at any time, uninstall the SEOmatic AI app from your repository on GitHub. Open pull requests stay yours.

Who Merges the Pull Request#

With Let SEOmatic merge its own changes on (the default), approving a page change in SEOmatic (a title, a description, structured data, links, alt text) is enough: SEOmatic merges its pull request for you and the card says Approved: merging the pull request on GitHub, then your site deploys it. It does this while your plan or your trial with a card is active and your agents are on.

SEOmatic leaves the merge to you, and the card starts with Merge it on GitHub and says why, when:

  • the pull request is a code change (a technical fix or a template), or a draft. Drafts say Let your build run, mark it ready for review, then merge it on GitHub
  • it conflicts with newer changes in your repository
  • one of your repository's checks failed on it
  • your branch protection asks for a review or a check first. Your branch protection always wins
  • it was still not ready to merge an hour after it was opened
  • your agents are off

To change who merges, open Connections, and in the GitHub section under your connection switch Let SEOmatic merge its own changes on or off.

What Your Agents Can Change#

File typeWhat a pull request can change
HTML pagesTitle, meta description, canonical, noindex, structured data, and the text inside the page's main area
Markdown postsTitle and description in the frontmatter. Canonical and noindex where your theme reads them. Never the URL
Next.js and Astro pagesTitle, description, canonical, noindex and structured data, where the code shows the page renders them
ASP.NET Core (Razor)Title, description, canonical and structured data in your templates. Content stored in a database is not edited
New articlesA new markdown file in your content folder, with the same fields as your other posts
Site-wide fixesSitemap, robots.txt and redirects. Your first one opens as a draft pull request

After the Merge#

SEOmatic follows your host's deploy, then checks your live page for the exact change. Only when it finds it is the fix marked Merged and live on your site. If you close a pull request without merging, that fix is dismissed.

The card saysWhat it means
Going live: your host is deploying the merged changeYour host (Vercel, Netlify and so on) is building the site. SEOmatic checks the live page as soon as it finishes.
Needs you: your host could not deploy the merged changeThe deploy failed. Run it again on your host, and the change goes live by itself.
Ready: publish your siteNothing on GitHub deploys your site, so publish it yourself. On a Lovable project, click Publish changes in Lovable.
Merged, but not showing on your site after four days of checksCheck that your site rebuilt after the merge and that it publishes from the branch the pull request went into. Or dismiss the task.

Fix Connection Errors#

You seeWhat to do
Your GitHub organization owner needs to approve SEOmatic...Ask an owner of your GitHub organization to approve the app, then click Continue with GitHub again.
SEOmatic cannot see any repositories you have access to...Click Open GitHub settings, give the SEOmatic AI app access to your website's repository, then try again.
Your repository is not in the listClick Give SEOmatic access to it on GitHub under the list.
This repository is archived on GitHub...Unarchive it on GitHub, or pick another repository.
The GitHub step took longer than an hour...Click Continue with GitHub. You pick up where you left off.
That GitHub installation is not on the GitHub account you are signed in with...Sign in to GitHub as the account that installed SEOmatic, then try again.
Your role in this workspace cannot add connections...Ask a workspace Owner or Admin to connect GitHub.
Do I connect Cloudflare or Vercel?
No. Connect the GitHub repository your host deploys from. When a pull request is merged, Vercel, Netlify or Cloudflare Pages rebuilds your site as usual. SEOmatic had a Cloudflare connection for a few days in early November 2026; it is gone, and nothing more is written through it, so you can delete that Cloudflare API token. Two Cloudflare things still matter: if its firewall blocks SEOmatic, the card names the addresses to allow; and the optional Cloudflare Worker on the AI crawlers card only counts AI bot visits (see let AI crawlers read your site).
My site is a Lovable project. What do I do after a change is merged?
Nothing on GitHub deploys a Lovable site, so the card says Ready: publish your site. In Lovable, click Publish changes. See connect a Lovable, Bolt or v0 site.
Can I check SEO on my own pull requests too?
Yes. In Connections, the GitHub section under your connection adds an SEO check to pull requests. By default it reports only and never blocks a merge.
Does reconnecting lose anything?
Reconnecting the same repository keeps the page map and history. Picking a different repository starts a new map.

Was This Article Helpful?

Still need help?Email contact@seomatic.ai with your site address and a screenshot. A person replies, usually within one business day.

digi-business-uk

Each local area page used to take us half a day to create and optimize.


With SEOmatic, we can create hundreds of pages in the same time, which helps our clients make the best use of their budget.


It's transformed how we deliver scalable SEO solutions.

will-hawkins

Will Hawkins

Marketing Director, Digi-Business UK

Give Your Site an SEO Team

Agents read your Search Console data, do the work, and prove what actually moved. You decide what ships.

  • You decide what ships
  • Verified live
  • One-click rollback

14-Day Trial for $1, credited to your first payment.