본문으로 건너뛰기
마케팅 · · 7분 분량

앱 딥 링크의 hreflang: 국제 SEO

작성자 Tolinku 팀
|
앱 딥 링크를 위한 Hreflang: 국제 SEO

앱이 여러 언어나 지역을 지원한다면, 검색엔진은 각 사용자에게 어떤 버전의 페이지를 보여줄지 알아야 해요. 그 역할을 하는 것이 hreflang 이에요. 이 설정이 없으면 Google이 프랑스 사용자에게 상품 페이지의 영어 버전을 보여주거나, 독일 사용자에게 미국 가격의 상품 페이지를 보여줄 수 있어요.

앱에 딥 링크가 있다면 hreflang 설정이 한 단계 더 추가돼요. 웹 페이지의 언어별 버전과 앱 딥 링크 대상을 맞춰야 하기 때문이에요. 이 가이드에서 그 방법을 제대로 설명해요. 앱 인덱싱 전반의 전략은 다음 문서를 참고하세요 모바일 앱의 인덱싱과 SEO. 앱 콘텐츠 전반의 캐노니컬 URL 전략은 다음 문서를 참고하세요 앱 콘텐츠의 정식 URL.

Hreflang 작동 방식

기본 개념

hreflang은 검색엔진에 이렇게 알려 줘요: "이 페이지는 여러 언어와 지역 버전으로 제공돼요. 각 버전의 URL은 다음과 같아요." 그러면 Google은 검색하는 사람의 언어와 위치에 맞는 버전을 보여줘요.

<head>
  <link rel="alternate" hreflang="en" href="https://www.yourapp.com/products/shoes" />
  <link rel="alternate" hreflang="es" href="https://www.yourapp.com/es/products/shoes" />
  <link rel="alternate" hreflang="fr" href="https://www.yourapp.com/fr/products/shoes" />
  <link rel="alternate" hreflang="de" href="https://www.yourapp.com/de/products/shoes" />
  <link rel="alternate" hreflang="x-default" href="https://www.yourapp.com/products/shoes" />
</head>

intent URL의 x-default x-default 값은 목록에 있는 어떤 버전과도 언어나 지역이 맞지 않는 사용자에게 보여줄 기본 버전을 지정해요.

언어 vs. 지역

hreflang은 언어만 지정하는 코드와 언어-지역 코드를 모두 지원해요:

코드 의미
en 영어(지역 무관)
en-US 미국 영어
en-GB 영국 영어
es 스페인어(지역 무관)
es-MX 멕시코 스페인어
pt-BR 브라질 포르투갈어

콘텐츠가 지역에 따라 다를 때(가격, 제공 여부, 법적 약관 등) 언어-지역 코드를 쓰세요. 모든 지역이 같은 번역을 쓴다면 언어만 지정하는 코드를 쓰세요.

옵션 1: 언어별 서브디렉터리

https://www.yourapp.com/products/shoes          (영어, 기본값)
https://www.yourapp.com/es/products/shoes       (스페인어)
https://www.yourapp.com/fr/products/shoes       (프랑스어)
https://www.yourapp.com/de/products/shoes       (독일어)

가장 간단한 방법이에요. 모든 콘텐츠가 한 도메인에 있어서 링크 가치가 유지돼요. 딥 링크 경로에 언어 접두사가 포함돼요.

앱의 딥 링크 처리:

// iOS: URL 경로에서 언어 추출
func handleDeepLink(_ url: URL) {
    let pathComponents = url.pathComponents
    let supportedLanguages = ["es", "fr", "de", "ja", "ko"]

    var language = "en"
    var contentPath = url.path

    if pathComponents.count > 1, supportedLanguages.contains(pathComponents[1]) {
        language = pathComponents[1]
        contentPath = "/" + pathComponents.dropFirst(2).joined(separator: "/")
    }

    setAppLanguage(language)
    navigateToContent(contentPath)
}

옵션 2: 지역별 별도 도메인

https://www.yourapp.com/products/shoes          (미국)
https://www.yourapp.co.uk/products/shoes        (영국)
https://www.yourapp.de/products/shoes           (독일)
https://www.yourapp.com.br/products/shoes       (브라질)

각 도메인은 자체 앱 링크 와 유니버설 링크 인증 파일을 가져야 해요. 설정 작업이 그만큼 늘어나요.

옵션 3: 언어별 서브도메인

https://en.yourapp.com/products/shoes
https://es.yourapp.com/products/shoes
https://fr.yourapp.com/products/shoes

검증 복잡도는 별도 도메인과 비슷해요. 각 서브도메인에 자체 인증 파일이 필요하니까요. assetlinks.json 와 apple-app-site-association 파일이 있어야 해요.

권장 사항: 법적 주체가 다르거나 지역별로 앱을 따로 빌드하는 등 확실한 이유가 없다면 서브디렉터리를 쓰세요.

각 페이지의 모든 언어 버전에 hreflang 태그를 추가하세요:

<!-- https://www.yourapp.com/products/shoes 페이지 -->
<head>
  <link rel="alternate" hreflang="en" href="https://www.yourapp.com/products/shoes" />
  <link rel="alternate" hreflang="es" href="https://www.yourapp.com/es/products/shoes" />
  <link rel="alternate" hreflang="fr" href="https://www.yourapp.com/fr/products/shoes" />
  <link rel="alternate" hreflang="x-default" href="https://www.yourapp.com/products/shoes" />
  <link rel="canonical" href="https://www.yourapp.com/products/shoes" />
</head>

<!-- https://www.yourapp.com/es/products/shoes 페이지 -->
<head>
  <link rel="alternate" hreflang="en" href="https://www.yourapp.com/products/shoes" />
  <link rel="alternate" hreflang="es" href="https://www.yourapp.com/es/products/shoes" />
  <link rel="alternate" hreflang="fr" href="https://www.yourapp.com/fr/products/shoes" />
  <link rel="alternate" hreflang="x-default" href="https://www.yourapp.com/products/shoes" />
  <link rel="canonical" href="https://www.yourapp.com/es/products/shoes" />
</head>

모든 페이지는 자기 자신을 포함해 다른 모든 언어 버전을 참조해야 해요. 이렇게 양방향 확인이 있어야 Google이 hreflang 설정을 검증해요.

사이트맵 구현

페이지가 수천 개인 대형 앱이라면 HTML 태그보다 사이트맵에 hreflang을 넣는 편이 관리하기 쉬워요:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <url>
    <loc>https://www.yourapp.com/products/shoes</loc>
    <xhtml:link rel="alternate" hreflang="en" href="https://www.yourapp.com/products/shoes" />
    <xhtml:link rel="alternate" hreflang="es" href="https://www.yourapp.com/es/products/shoes" />
    <xhtml:link rel="alternate" hreflang="fr" href="https://www.yourapp.com/fr/products/shoes" />
    <xhtml:link rel="alternate" hreflang="x-default" href="https://www.yourapp.com/products/shoes" />
  </url>
  <url>
    <loc>https://www.yourapp.com/es/products/shoes</loc>
    <xhtml:link rel="alternate" hreflang="en" href="https://www.yourapp.com/products/shoes" />
    <xhtml:link rel="alternate" hreflang="es" href="https://www.yourapp.com/es/products/shoes" />
    <xhtml:link rel="alternate" hreflang="fr" href="https://www.yourapp.com/fr/products/shoes" />
    <xhtml:link rel="alternate" hreflang="x-default" href="https://www.yourapp.com/products/shoes" />
  </url>
</urlset>

서버 측 언어 감지

딥 링크 URL에 접속하면 사용자의 언어를 감지해서 그에 맞게 라우팅하세요:

app.get('/products/:slug', (req, res) => {
  const acceptLanguage = req.headers['accept-language'];
  const userLang = parseLanguage(acceptLanguage); // 예: 'es'
  const localizedPath = userLang !== 'en' ? `/${userLang}/products/${req.params.slug}` : req.path;

  // 앱 사용자는 딥 링크로 현지화된 콘텐츠를 열어요
  // 웹 사용자는 현지화된 페이지로 리다이렉트해요
  if (isBot(req.headers['user-agent'])) {
    // 봇에게는 영어 버전을 보여 줘요 (봇은 hreflang으로 다른 버전을 찾아가요)
    renderPage(req.params.slug, 'en', res);
  } else {
    res.redirect(302, localizedPath);
  }
});

앱 측 언어 처리

앱이 딥 링크를 열 때 URL의 언어 접두사로 콘텐츠 언어를 설정하세요:

// Android: 현지화된 딥 링크 처리
class ProductActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        val uri = intent.data ?: return
        val pathSegments = uri.pathSegments

        // 첫 번째 경로 세그먼트가 언어 코드인지 확인
        val supportedLangs = setOf("es", "fr", "de", "ja", "ko", "pt")
        val lang = if (pathSegments.isNotEmpty() && supportedLangs.contains(pathSegments[0])) {
            pathSegments[0]
        } else {
            "en"
        }

        val slug = pathSegments.last()
        viewModel.loadProduct(slug, lang)
    }
}

다국어 콘텐츠의 구조화된 데이터

현지화된 구조화된 데이터

언어 버전마다 현지화된 값을 담은 구조화 데이터를 따로 넣으세요:

<!-- 영어 버전 -->
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "러닝화",
  "description": "일상 훈련용 경량 러닝화",
  "offers": {
    "@type": "Offer",
    "price": "120.00",
    "priceCurrency": "USD"
  },
  "potentialAction": {
    "@type": "ViewAction",
    "target": "https://www.yourapp.com/products/running-shoes"
  }
}
</script>

<!-- 스페인어 버전 -->
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Zapatillas de Running",
  "description": "Zapatillas ligeras para entrenamiento diario",
  "offers": {
    "@type": "Offer",
    "price": "110.00",
    "priceCurrency": "EUR"
  },
  "potentialAction": {
    "@type": "ViewAction",
    "target": "https://www.yourapp.com/es/products/running-shoes"
  }
}
</script>

흔한 실수

모든 hreflang 주석은 양방향이어야 해요. 페이지 A가 "내 스페인어 버전은 페이지 B"라고 하면, 페이지 B도 "내 영어 버전은 페이지 A"라고 해야 해요. 한쪽이라도 빠지면 Google은 그 쌍의 hreflang 관계 전체를 무시해요.

캐노니컬과 hreflang의 충돌

현지화된 페이지의 canonical URL을 기본 언어 버전으로 설정하지 마세요. 언어 버전마다 자기 자신을 가리키는 canonical을 두세요:

<!-- 잘못된 예: 스페인어 페이지의 canonical을 영어 페이지로 지정 -->
<link rel="canonical" href="https://www.yourapp.com/products/shoes" />

<!-- 올바른 예: 스페인어 페이지의 canonical을 자기 자신으로 지정 -->
<link rel="canonical" href="https://www.yourapp.com/es/products/shoes" />

누락된 x-default

항상 넣으세요 x-default 언어나 지역이 어느 버전과도 맞지 않는 사용자를 처리하려면 필요해요. 없으면 Google이 어떤 버전을 보여 줄지 추측해요.

Tolinku 경로 기반 규칙으로 딥 링크 라우팅을 지원해요. 다음과 같이 라우트를 설정해요 /:lang/products/:slug 같은 라우트를 설정에 추가하면 Tolinku 대시보드 현지화된 딥 링크를 처리해요. 라우트 파라미터가 언어 코드를 앱에 넘기면, 앱이 해당 언어로 콘텐츠를 불러와요.

다국어 사이트에서 배너를 현지화하는 방법은 다음을 참고하세요 스마트 배너 현지화. 더 넓은 앱 인덱싱 전략은 다음 글을 참고하세요: 모바일 앱의 인덱싱과 SEO.

딥 링킹 팁을 메일로 받아 보세요

일주일에 한 번만 보내요. 스팸은 없어요.

앱에 딥 링킹을 추가해 볼까요?

유니버설 링크, 앱 링크, 디퍼드 딥 링킹, 분석을 몇 분 만에 설정할 수 있어요. 무료로 시작하세요.