<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Việc HOT</title>
    <description>The latest articles on DEV Community by Việc HOT (@viechot).</description>
    <link>https://dev.to/viechot</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4201452%2Fa6b02739-cc5e-45ef-b1b0-666c6474fd39.png</url>
      <title>DEV Community: Việc HOT</title>
      <link>https://dev.to/viechot</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/viechot"/>
    <language>en</language>
    <item>
      <title>Keeping a Next.js job-board sitemap fresh: lessons from running Việc HOT</title>
      <dc:creator>Việc HOT</dc:creator>
      <pubDate>Fri, 23 Oct 2026 02:23:54 +0000</pubDate>
      <link>https://dev.to/viechot/keeping-a-nextjs-job-board-sitemap-fresh-lessons-from-running-viec-hot-4jh1</link>
      <guid>https://dev.to/viechot/keeping-a-nextjs-job-board-sitemap-fresh-lessons-from-running-viec-hot-4jh1</guid>
      <description>&lt;p&gt;Running a Vietnamese job board (&lt;a href="https://viec.hot" rel="noopener noreferrer"&gt;Việc HOT&lt;/a&gt;) taught us that job listings are the hardest content type to keep indexed: they appear and expire within days, and Google only finds them quickly if your sitemap is accurate.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Split sitemaps with generateSitemaps
&lt;/h2&gt;

&lt;p&gt;Next.js App Router lets you shard sitemaps by id. We keep static pages, categories, companies and jobs in separate files so a single slow query never breaks the whole index.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// app/sitemap/[id]/route.ts (simplified)&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;generateSitemaps&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt; &lt;span class="p"&gt;}];&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Revalidate after every import
&lt;/h2&gt;

&lt;p&gt;Our first bug: new jobs showed on the site but not in the sitemap, because the sitemap was cached by ISR. The fix is to call &lt;code&gt;revalidatePath('/sitemap/40.xml')&lt;/code&gt; (or &lt;code&gt;revalidateTag('jobs')&lt;/code&gt;) at the end of each import job, and purge the CDN path.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. lastmod must be the real update time
&lt;/h2&gt;

&lt;p&gt;Google ignores &lt;code&gt;lastmod&lt;/code&gt; if it is always "now". Use the job's own &lt;code&gt;updatedAt&lt;/code&gt;, not the time the sitemap was generated.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Remove expired jobs, keep their pages as noindex
&lt;/h2&gt;

&lt;p&gt;Expired listings leave the sitemap and return &lt;code&gt;noindex, follow&lt;/code&gt; without JobPosting markup, so users still land somewhere useful while Google drops them.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Complete JobPosting address fields
&lt;/h2&gt;

&lt;p&gt;Search Console flags missing &lt;code&gt;addressLocality&lt;/code&gt; and &lt;code&gt;postalCode&lt;/code&gt; inside &lt;code&gt;jobLocation.address&lt;/code&gt;. Filling them from structured location data fixed every warning for us.&lt;/p&gt;

&lt;p&gt;You can see the result live on the &lt;a href="https://viec.hot/viec-lam-moi-nhat" rel="noopener noreferrer"&gt;latest jobs page&lt;/a&gt; and our free &lt;a href="https://viec.hot/tao-cv" rel="noopener noreferrer"&gt;CV builder&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>seo</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
