.
All checks were successful
Deploy blog-frontend / build-and-deploy (push) Successful in 43s

This commit is contained in:
ParkWonYeop
2025-12-28 02:11:33 +09:00
parent 056070ff64
commit 5f3089a49c
2 changed files with 16 additions and 3 deletions

View File

@@ -1,3 +0,0 @@
User-agent: *
Allow: /
Sitemap: https://blog.wypark.me/sitemap.xml

16
src/app/robots.ts Normal file
View File

@@ -0,0 +1,16 @@
import { MetadataRoute } from 'next';
export default function robots(): MetadataRoute.Robots {
const baseUrl = 'https://blog.wypark.me';
return {
rules: {
userAgent: '*',
allow: '/',
// 검색 로봇이 굳이 긁어갈 필요 없는 페이지들은 차단 (글쓰기, 로그인 등)
disallow: ['/write', '/login', '/signup', '/admin'],
},
// 여기서 동적으로 생성된 sitemap.xml을 가리킵니다.
sitemap: `${baseUrl}/sitemap.xml`,
};
}