Right, so listen—if you’re tryna help search engines actually find your stuff, you need an XML sitemap. Took me embarrassingly long to realize it. 😅 Not joking, I thought Google was just, like, psychic.
Anyway. I started messing around with my site and noticed not all pages were showin’ up in search. Not cool. That’s when it hit me: no sitemap. Yeah. Rookie mistake. Had to fix it.
XML sitemaps tell search engines, “Yo, here’s the good stuff. Crawl it. Index it. Show it to the people.”
You don’t need to be a coder to make one. Swear.
Why this little file matters more than it should
-
Fast-tracking pages to Google’s brain.
I ain’t waiting 6 months for Google to “maybe” notice my blog update. No thanks. Sitemap pushes it through like a fast pass. -
Found stuff Google mighta missed.
Y’all ever have pages that got no links to them? Like a coupon page from 3 years ago that still makes conversions? That belongs in the sitemap. -
It talks metadata.
I don’t always remember when I last changed a post. But the sitemap? It never forgets. It tells search bots the date. The mood. The vibes. -
Search Console vibes
Added my sitemap and suddenly I knew what was breakin’. Pages returning 404s. Soft errors. Crawl issues. Like magic—but from the backend.
How I actually created mine (don’t laugh)
Was on WordPress. So I went with plugins. Didn’t even try to hand-code it. Ain’t got the patience.
-
Installed Yoast. Boom. Sitemap generated.
-
Looked weird at first but then I read the docs (kinda).
-
URL was
example.com/sitemap_index.xml
. Easy.
Folks using Shopify or Wix? It’s automatic. Don’t even stress. You probably already got one and just don’t know where it lives. 😂
Now if you’re not using a CMS, good luck friend—you’re building one manually.
What the file looked like
It had tags and stuff. Some looked like this:
I kept everything lowercase, just felt right. The <loc>
is your link. <lastmod>
is, well, last modified. The other ones… they optional but I used ’em anyway. Google ignores ’em half the time but hey, I did my part.
Hosted it where it belongs
So I slapped it right at the root. Like:sitemap.xml
No folders. Just clean and visible.
Also dropped this lil line into my robots.txt
like a boss:
Now when the bots read robots.txt, they get directed to the sitemap. That’s, like, SEO manners or something.
Told Google about it (kinda smugly tbh)
I went into Search Console, found the “Sitemaps” section, typed in sitemap.xml
, hit submit.
Done. Felt powerful.
Couple hours later I saw it processed. Google was like, “Alright bet, I gotchu.”
Pages started popping in the index faster.
Same process with Bing but who’s really searching Bing? (Sorry Bing fans.)
Tips nobody told me but I learned painfully
-
Don’t put 80,000 URLs in one sitemap. That’s too many. Split that sucker.
-
If you don’t update it, it’ll go stale. Like bread. Old bread.
-
Exclude garbage. Admin pages? Nah. Print-friendly pages? Nope. Thank-you pages? Bye.
-
If you delete a page, take it out the sitemap. Google don’t like ghosts.
-
Use full URLs. Not
/blog
, usehttps://example.com/blog
. Robots are picky.
Stuff broke. Fixed it. Here’s how.
I had one sitemap that just returned a 404. Turns out, I uploaded it to the wrong directory. facepalm
Another time? Google ignored my sitemap completely. Why? I had disallowed the entire site in robots.txt. Genius move, me.
Also made the mistake of linking to URLs that returned 302s. Google don’t love temporary redirects in sitemaps. Change ’em to 200s if you can.
TL;DR if you’re skimming
-
XML sitemap = essential for SEO.
-
Helps search engines find your stuff.
-
Use plugins or online generators.
-
Submit it to Google & Bing (maybe).
-
Keep it clean, updated, and hosted right.
-
Don’t overthink it—but don’t ignore it either.
That’s how I did it. Kinda messy but it worked. Now my site’s indexed proper, crawl errors are low, and I sleep better. Hope this helps you do yours—without all the faceplants I went through. 😵💫
Also, you can learn more about Canonical Tags here.