Conversation
There was a problem hiding this comment.
Code Review
This pull request implements SEO improvements by integrating react-helmet-async and introducing a reusable Seo component to manage meta tags. It also adds robots.txt and sitemap.xml files, and applies SEO configurations to the main and login pages. A review comment suggests refining the robots meta tag in the Seo component to use nofollow if the goal is to prevent search engines from crawling links on non-indexed pages.
| <Helmet> | ||
| <title>{config.title}</title> | ||
| <meta name="description" content={config.description} /> | ||
| {config.noindex && <meta name="robots" content="noindex,follow" />} |
There was a problem hiding this comment.
There was a problem hiding this comment.
이 부분은 의도적으로 noindex,follow로 설정했습니다.
아래 링크는 Google 공식 문서인데 noindex,nofollow 가 페이지 자체의 크롤링까지는 막지는 않아서 유지하는 게 맞는 것 같습니다.
Google 문서 기준으로 nofollow는 해당 페이지 안의 링크를 따라가지 않도록 하는 설정에 가깝고, 페이지를 검색 결과에서 제외하는 목적에는 noindex가 맞습니다.
로그인 페이지는 공개 URL인데 검색 결과에는 노출되지 않게 하는 것이 목적이라 지금은 이게 맞다고 판단했습니다.
📝 요약 (Summary)
Google 검색 결과에서 홈 제목이 의도한 메타 대신
Seed Logo로 보이는 문제가 있어서 SEO 기본 구조를 정리했습니다.페이지별 메타 관리, 로그인 페이지
noindex,robots.txt/sitemap.xml추가해줬습니다.✅ 주요 변경 사항 (Key Changes)
react-helmet-async기반으로 페이지별 SEO 메타 관리 구조 추가noindex,follow처리robots.txt,sitemap.xml추가h1로 변경하고 로고alt문구를SEED로 정리💻 상세 구현 내용 (Implementation Details)
1. 페이지별 SEO 메타 관리 구조 추가
기존에는
index.html의 정적 메타만 설정해줬습니다.react-helmet-async를 적용해서MainPage,LoginPage에서 각각 필요한title,description,canonical,robots를 제어할 수 있도록 변경했습니다.ApplicationProviders에HelmetProvider추가Seo공용 컴포넌트 추가DEFAULT_SEO,LOGIN_PAGE_SEO상수 분리2. 로그인 페이지는
robots.txt가 아니라noindex로 처리Google 공식 문서에 따르면
robots.txt는 크롤링을 제어하는 용도이지, 검색 결과에서 페이지를 반드시 제외하는 용도는 아닙니다.그래서
/login은robots.txt차단 대신에 메타 태그noindex,follow를 적용해서 "검색 결과에는 안 나오는데 굳이 해당 페이지에 있는 다른 링크들을 숨기지는 않겠다" 정도로 설정했습니다.참고:
3.
robots.txt와sitemap.xml추가robots.txt에는 인증이 필요한 경로(/mypage,/upload,/project/)를 크롤링을 권장하지 않는 경로로 추가했습니다.// robots.txt User-agent: * Allow: / Disallow: /mypage Disallow: /upload Disallow: /project/ Sitemap: https://www.seedlab.cloud/sitemap.xml이 경로들은 실제로
ProtectedRoute로 보호되고 있어서 검색 엔진이 굳이 볼 이유가 없다고 판단했습니다.sitemap.xml은 홈(/) URL만 남긴 최소 형태로 구성했습니다.Google 공식 문서 기준으로 sitemap은 "검색 결과에 표시하려는 canonical URL"을 알려주는 역할에 가깝고, 사실상 우리 사이트의 홈 화면만 공개 SEO 대상이라 위와 같이 진행했습니다.
또한 같은 문서에서 Google은
<priority>와<changefreq>를 무시한다고 안내하고 있고,<lastmod>는 정확하고 일관되게 유지할 수 있을 때만 사용하는 것을 권장하고 있어 이번에는 단순한 형태로 유지했습니다.참고:
4. 검색 결과 재작성 완화를 위한 문서 신호 보완
검색 결과에서 제목이
Seed Logo로 보이던 현상을 줄이기 위해 문서 구조도 함께 정리했습니다.h1로 지정alt를Seed Logo에서SEED로 수정🚀 트러블 슈팅 (Trouble Shooting)
해당 없음
📸 스크린샷 (Screenshots)
#️⃣ 관련 이슈 (Related Issues)