# Using Tags In Theme

When search engines crawl websites, they look for hreflang tags to determine the language and region that the website is intended for, and then use that to serve the correct URL based on a user's language and location.

For example, if a store has a default URL of `your-store.myshopify.com`, and a Spanish language version of `es.your-store.myshopify.com`, then including hreflang tags in your theme will ensure that a customer located in Spain, or with a Spanish language setting, will be served the Spanish URL.

### hreflang tags <a href="#hreflang-tags" id="hreflang-tags"></a>

An hreflang tag is a `link` element that identifies a localized URL of a website. You should add a unique hreflang tag for each language or region URL that exists, and they should be included in the `<head>`, which is commonly found in `theme.liquid`.

For example:

{% code title="layout/theme.liquid" %}

```liquid
<head>
  <!-- head element content -->

  <link rel="alternate" hreflang="en" href="your-store.myshopify.com" />
  <link rel="alternate" hreflang="es" href="es.your-store.myshopify.com" />
</head>
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mac-eth.gitbook.io/macs-web-dev-sop/seo/hreflang-tags/using-tags-in-theme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
