<?xml version="1.0" encoding="UTF-8"?>
<!--
  SITEMAP AI4Edu — PHẢI khớp với:
    1. Mảng ROUTES trong frontend/scripts/prerender.mjs
    2. Route công khai trong frontend/src/App.jsx

  GHI CHÚ QUAN TRỌNG:
  • lastmod phải là ngày THẬT SỰ đã sửa nội dung, không được ở TƯƠNG LAI.
    Bản cũ ghi 2026-11-15 cho các trang /tools (hôm nay mới 13/11/2026) —
    Google thấy mốc thời gian vô lý sẽ bỏ qua lastmod của TOÀN BỘ file.
  • Đã BỎ /tools/edu: nội dung trùng khít /tools và canonical của nó cũng trỏ
    về /tools, nên khai báo trong sitemap là tự nhận mình là bản sao. URL này
    giờ được 301 → /tools (xem React Router + redirect bên dưới).
  • /terms và /privacy phải nằm ở đây VÌ chúng là trang thật (không cần đăng
    nhập) — trước đây có trong sitemap nhưng KHÔNG được prerender nên luôn
    trả về nội dung trang chủ.
-->
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
        http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">

    <!-- Trang chủ -->
    <url>
        <loc>https://ai4edu.io.vn/</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>daily</changefreq>
        <priority>1.0</priority>
    </url>

    <!-- Kho Kiến Thức AI - Hướng dẫn -->
    <url>
        <loc>https://ai4edu.io.vn/knowledge/guides</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.9</priority>
    </url>

    <!-- Kho Kiến Thức AI - Đạo đức & An toàn AI -->
    <url>
        <loc>https://ai4edu.io.vn/knowledge/ethics</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.9</priority>
    </url>

    <!-- Kho Kiến Thức AI - Công cụ & Ứng dụng sư phạm -->
    <url>
        <loc>https://ai4edu.io.vn/knowledge/tools</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.9</priority>
    </url>

    <!-- Khóa Học & Khảo Thí Chứng Nhận AI -->
    <url>
        <loc>https://ai4edu.io.vn/certifications</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.9</priority>
    </url>

    <!-- Mạng lưới trường học đối tác -->
    <url>
        <loc>https://ai4edu.io.vn/partner-schools</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.8</priority>
    </url>

    <!-- Diễn đàn cộng đồng giáo dục AI -->
    <url>
        <loc>https://ai4edu.io.vn/community</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>daily</changefreq>
        <priority>0.8</priority>
    </url>

    <!-- Công cụ xây dựng Prompt Sư phạm -->
    <url>
        <loc>https://ai4edu.io.vn/prompt</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>monthly</changefreq>
        <priority>0.8</priority>
    </url>

    <!-- Cổng Gia nhập Trường học -->
    <url>
        <loc>https://ai4edu.io.vn/join-school</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>monthly</changefreq>
        <priority>0.7</priority>
    </url>

    <!-- Giới thiệu về AI4Edu -->
    <url>
        <loc>https://ai4edu.io.vn/about</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>monthly</changefreq>
        <priority>0.7</priority>
    </url>

    <!-- Liên hệ & Hợp tác -->
    <url>
        <loc>https://ai4edu.io.vn/contact</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>monthly</changefreq>
        <priority>0.7</priority>
    </url>

    <!-- Điều khoản & Chính sách bảo mật -->
    <!--
      KHÔNG khai báo /legal ở đây: URL đó 301 → /terms (xem web.config,
      rule "Dedupe legal"). Sitemap chỉ được chứa URL trả 200.
    -->
    <url>
        <loc>https://ai4edu.io.vn/privacy</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>monthly</changefreq>
        <priority>0.5</priority>
    </url>
    <url>
        <loc>https://ai4edu.io.vn/terms</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>monthly</changefreq>
        <priority>0.5</priority>
    </url>

    <!-- ================================================================
         Bộ tiện ích lớp học (công khai, không cần đăng nhập)
         Đã kiểm chứng: các route này nằm ngoài ProtectedRoute và API
         tương ứng đều [AllowAnonymous].
         ================================================================ -->
    <url>
        <loc>https://ai4edu.io.vn/tools</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.8</priority>
    </url>
    <url>
        <loc>https://ai4edu.io.vn/tools/games</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.8</priority>
    </url>
    <url>
        <loc>https://ai4edu.io.vn/tools/games/goldenbell</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.8</priority>
    </url>
    <url>
        <loc>https://ai4edu.io.vn/tools/flashcard</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.7</priority>
    </url>
    <url>
        <loc>https://ai4edu.io.vn/tools/picker</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.7</priority>
    </url>
    <url>
        <loc>https://ai4edu.io.vn/tools/timer</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.7</priority>
    </url>
    <url>
        <loc>https://ai4edu.io.vn/tools/buzzer</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.7</priority>
    </url>
    <url>
        <loc>https://ai4edu.io.vn/tools/poll</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.7</priority>
    </url>
    <url>
        <loc>https://ai4edu.io.vn/tools/quizmix</loc>
        <lastmod>2026-11-13</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.9</priority>
    </url>
</urlset>
