사이트맵 url 5만개 넘었을때 등록하는 방법
·
조회수 16
구글 문서( https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap?hl=ko )를 보면 아래와 같이 사이트맵의 용량제한과 url갯수 제한이 있는걸 알수 있습니다.
❝사이트맵 크기 제한: 형식과 관계없이 사이트맵은 1개당 50MB(압축하지 않은 파일 기준) 또는 URL 50,000개로 제한됩니다.❞
이런 경우(5만개 이상)에는 사이트맵 색인을 이용해 등록을 하시면 되는데 해당 문서( https://developers.google.com/search/docs/crawling-indexing/sitemaps/large-sitemaps?hl=ko )에 설명되어 있는 아래 코드를 참고하시면 어렵지 않게 해결할 수가 있습니다.
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://www.example.com/sitemap1.xml.gz</loc>
<lastmod>2024-08-15</lastmod>
</sitemap>
<sitemap>
<loc>https://www.example.com/sitemap2.xml.gz</loc>
<lastmod>2022-06-05</lastmod>
</sitemap>
</sitemapindex>