inemaSEO 1 — Foundation: the X-ray and the groundwork of your site|INEMA.CLUB-PRO

Lesson 5 · 15 min

Sitemaps with real dates and hreflang

The sitemap is the list of pages you hand to the search engine. It only helps if it tells the truth: the pages that exist and the date each one actually changed. If your site has versions in other languages, hreflang says which is which, and that opens up a whole market.

Start the lesson
An open paper map on a wooden table, with pins connected by string.

In this lesson you will

  1. 1Why the sitemap comes from the same data that builds the pages
  2. 2The real change date, never the build time
  3. 3Two-way hreflang, on every page
  4. 4The case of INEMA's Spanish page

Goal: generate the sitemap from the same data as the pages, with the real change date and reciprocal hreflang when there is a translation.

01One data source, two outputs

Tap each block.

Click each block in the diagram to see what it does.

A hand-written sitemap goes out of date on day one. A sitemap generated from the data doesn't lie.

02Build it and check it

Tap each step.

1. Find the generator

Many website platforms generate the sitemap on their own. Find out where it's generated and what data it comes from.

If the sitemap was written by hand, replacing it is the first thing to do.

03What it looks like and how to check

The sitemap format with hreflang, the generator pattern, and the check command.

sitemap.xml · one URL with translations
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://www.seusite.com/</loc>
<xhtml:link rel="alternate" hreflang="pt-BR" href="https://www.seusite.com/" />
<xhtml:link rel="alternate" hreflang="en" href="https://www.seusite.com/en/" />
<xhtml:link rel="alternate" hreflang="es" href="https://www.seusite.com/es/" />
<xhtml:link rel="alternate" hreflang="x-default" href="https://www.seusite.com/" />
<lastmod><yyyy-mm-dd of the last change></lastmod>
</url>
</urlset>
Next.js · app/sitemap.ts (portal standard, abridged)
// the date comes from the data; never the build time
const languages = { 'pt-BR': `${SITE_URL}/`, en: `${SITE_URL}/en/`, es: `${SITE_URL}/es/`, 'x-default': `${SITE_URL}/` }
return ['/', '/en/', '/es/'].map(path => ({
  url: `${SITE_URL}${path}`,
  lastModified: latest,
  alternates: { languages },
}))
Terminal · sitemap URLs and hreflang
x=$(curl -4 -m 20 -s https://www.seusite.com/sitemap.xml)
echo "$(echo "$x" | grep -c '<loc>') URLs, $(echo "$x" | grep -c 'hreflang') hreflang annotations"
echo "$x" | grep -oE '<lastmod>[^<]*' | sort | uniq -c | sort -rn | head
Example from the repository

First URL in the www.inema.club sitemap on 10/19/2026:

<loc>https://www.inema.club/</loc>
<xhtml:link rel="alternate" hreflang="pt-BR" href="https://www.inema.club/" />
<xhtml:link rel="alternate" hreflang="en" href="https://www.inema.club/en/" />
<xhtml:link rel="alternate" hreflang="es" href="https://www.inema.club/es/" />
<xhtml:link rel="alternate" hreflang="x-default" href="https://www.inema.club/" />
<lastmod>2026-10-19</lastmod>

The home page changes when the catalog changes, so its date is the catalog's date.

04Practice: a sitemap that tells the truth

Use the Sitemaps blocks from your raio-x.txt.

E1 · Three dates

20 min

Pick 3 URLs from your sitemap and compare each lastmod with the date of that page's last real change.

Done when: the 3 dates match, or you noted where the generator gets the date and what to change.

E2 · hreflang round trip

20 min

If your site has translations, open a page in each language and check that each one lists all the versions. With no translation, write "not applicable" and the language that would make sense.

Done when: the round trip was checked across the versions, or the "not applicable" is noted with the reason.

05Test what you learned

The explanation appears after you answer.

Question 1 of 4

All the URLs in your sitemap have today's date. What does that suggest?skill

06Takeaways

From the dataPages and sitemap come from the same list.
Real datelastmod = content change, never the build.
hreflangReciprocal, with x-default, on each page.

Going further

Previous lessonNext lesson