What is a sitemap.xml and why does it matter?
A sitemap.xml is a file that lives on your website and lists every page you want search engines to know about. Think of it as a table of contents for Google and Bing.
Without a sitemap, search engines have to discover your pages by following links — which can take weeks or even months. With a sitemap, you tell them exactly where to look and they crawl your site within days.
😴
Without sitemap
Google finds pages by following links. Can take weeks to months.
🚀
With sitemap
You tell Google every page directly. Indexed within days.
Generate your sitemap.xml
Before you can submit a sitemap, you need one. How you generate it depends on how your website is built.
Option A — Next.js (automatic)
If your site is built with Next.js 13+, create a file at app/sitemap.ts:
import { MetadataRoute } from 'next'
export default function sitemap(): MetadataRoute.Sitemap {
const base = 'https://www.your-domain.com'
const now = new Date()
return [
{ url: base, lastModified: now, priority: 1.0 },
{ url: `${base}/about`, lastModified: now, priority: 0.8 },
{ url: `${base}/pricing`, lastModified: now, priority: 0.7 },
{ url: `${base}/blog`, lastModified: now, priority: 0.6 },
{ url: `${base}/contact`, lastModified: now, priority: 0.5 },
]
}Next.js automatically serves this at https://your-domain.com/sitemap.xml. No extra steps needed.
Option B — WordPress
Install the free Yoast SEO or Rank Math plugin:
- WordPress Dashboard → Plugins → Add New → search "Yoast SEO" → Install → Activate
- Go to SEO → General → Features → enable XML Sitemaps
- Your sitemap is now live at
https://your-domain.com/sitemap_index.xml
Option C — Plain HTML / any other site
Use a free online generator:
- Go to xml-sitemaps.com
- Enter your website URL → click Start
- Download the generated
sitemap.xmlfile - Upload it to the root of your website (same folder as your homepage)
- Verify it's accessible at
https://your-domain.com/sitemap.xml
How to check if your sitemap is working
Also add your sitemap to robots.txt
Your robots.txt file (at the root of your site) should reference your sitemap so crawlers find it automatically:
User-agent: *
Allow: /
Disallow: /dashboard/
Disallow: /api/
Sitemap: https://www.your-domain.com/sitemap.xmlSet up Google Search Console
Google Search Console (GSC) is Google's free tool that lets you tell Google about your site, monitor indexing status, and see which keywords bring visitors to your site.
2.1 — Add your property
- Go to search.google.com/search-console and sign in with your Google account
- Click "Add property" in the top-left dropdown
- Choose "URL prefix" (not Domain) and enter your full URL with www:
https://www.your-domain.com - Click Continue
⚠️ Important
2.2 — Verify ownership
Google needs to confirm you own the site. There are two easy methods:
Method 1: HTML file (recommended for most sites)
- Google gives you a file like
googleXXXXXXXX.html— download it - Upload it to the root of your website (same level as your homepage)
- Verify it's accessible:
https://your-domain.com/googleXXXXXXXX.html - Go back to Google Search Console → click Verify
Method 2: DNS TXT record (better for long-term — file won't get deleted)
- In Google Search Console, choose "DNS record" verification method
- Copy the TXT record value — looks like:
google-site-verification=xxxxx - Go to your domain registrar (GoDaddy, Namecheap, etc.) → DNS settings
- Add a new record: Type: TXT, Name: @, Value: paste the code
- Save and click Verify in Google Search Console (may take up to 15 minutes)
2.3 — Submit your sitemap
- In the left sidebar, click Sitemaps
- In the "Add a new sitemap" box, type:
sitemap.xml - Click Submit
- You should see status change to "Success" with a count of URLs discovered
Sitemap shows 'Couldn't fetch'?
2.4 — Request indexing
- In the left sidebar, click URL Inspection
- Enter your homepage URL and press Enter
- Click "Request Indexing"
- You'll see "Indexing requested — URL was added to a priority crawl queue"
- Repeat for any other important pages (about, pricing, etc.)
Set up Microsoft Bing Webmaster Tools
Bing Webmaster Tools covers both Bing search and Microsoft Copilot AI — making it important even if you think only Google matters.
Method 1: Import from Google Search Console (easiest — 2 clicks)
If you already completed Step 2, this is by far the fastest way:
- Go to bing.com/webmasters → sign in with a Microsoft account
- On the welcome screen, click "Import" under "Import your sites from GSC"
- Sign in to your Google account when prompted
- Bing automatically imports your site and sitemap — no verification needed
- Done! Your sitemap status will show as "Processing" then "Success" within a few hours
Method 2: Manual setup
If you don't want to connect Google, do it manually:
- Go to bing.com/webmasters → sign in
- Enter your site URL in the manual box → click Add
- Download the
BingSiteAuth.xmlverification file - Upload it to the root of your website
- Click Verify
- Go to Sitemaps → click Submit sitemap → enter your sitemap URL → Submit
Why bother with Bing?
What happens next — realistic timeline
Sitemap processed
Both Google and Bing read your sitemap and discover your pages.
Pages crawled
Googlebot and Bingbot visit your pages and read the content.
Pages indexed
Your pages appear in search results. You can check by searching site:your-domain.com on Google.
Rankings appear
Search Console starts showing impressions and clicks data. Your pages rank for their target keywords.
Authority builds
As you earn backlinks and user engagement, rankings improve. SEO is a long game.
Quick checklist — make sure you haven't missed anything
Check your site's SEO score for free
Once your site is indexed, run a free SEO audit with SEO-Snap to see exactly what to improve — 251 rules checked in under 60 seconds.
Run Free SEO Audit →