Documentation
Feedback
Guides
Storefront Development

Storefront Development
Store FrameworkSetting up cross-border stores
Indicating alternate versions of localized pages in cross border stores

If you have different versions of a landing page for each region your store is present, we recommend that you save them as alternate versions.

This way, search engines will be aware of the different versions of your page and able to provide the right content to the right audience.

Notice that this is especially useful for improving your store's SEO.

Keep in mind that when indicating alternate versions of a page, you must do it in pairs. For example, if you point the USA version of a page to a Brazilian variant, then the Brazilian page must point to the USA version as well.

By doing that, search engines are capable of understanding the relationship between those two pages, avoiding issues such as indicating the incorrect title for a given page or wrong indexing.

{"base64":"  ","img":{"width":539,"height":452,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":18577,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/vtex-io-documentation-indicating-alternate-pages-in-cross-border-stores-0.png"}}

Hence, be aware that you'll need to perform the following step by step for each localized version of your landing page.

It's important for search engines that each version of a page indicates itself as well as the other localized versions as alternates. However, you don't need to worry about self-referencing since we already do that for you.

Step by step

  1. Install the vtex.admin-graphql-ide@3.x app using your terminal.
  2. In your browser, access your account's admin and go to the GraphQL IDE section.
  3. From the GraphQL IDE dropdown list, choose the vtex.rewriter app.
  4. Run the following query to get the internal data related to the specified page path.

_11
{
_11
internal {
_11
get(path: "/{URL}") {
_11
from
_11
declarer
_11
type
_11
id
_11
binding
_11
}
_11
}
_11
}

Remember to replace the values between the curly brackets according to your scenario.

  1. Save the returned data.
  2. Erase the previous query and fill in the main text box with the following mutation command.

_10
mutation saveInternal($args: InternalInput!) {
_10
internal {
_10
save(route: $args) {
_10
id
_10
}
_10
}
_10
}

  1. Click on Query Variables at the bottom of the page and, according to the following example and the following explanations, fill in the Query Variables section.

_19
{
_19
"args": {
_19
"from": "/US/about-us",
_19
"declarer": "vtex.store@2.x",
_19
"type": "userRoute",
_19
"id": "vtex.store@2.x:store.custom::us-about-us",
_19
"binding": "748aafcf-3572-456d-5dec-6ddb3f26e43f",
_19
"alternates": [
_19
{
_19
"binding": "7cf37a3b-efc0-4e47-8201-d8b58kd4d3fd",
_19
"path": "/BR/sobre-nos"
_19
},
_19
{
_19
"binding": "8cf37a3b-edc0-4a47-8241-d8b58kfsd3fd",
_19
"path": "/UK/about-us"
_19
}
_19
]
_19
}
_19
}

  • Replace the from, declarer, type, id, and binding values with the information obtained in step 4.
  • Regarding the alternates field, fill in the binding and path values according to the alternate landing page's data.

If you don't know the binding values of your stores, follow this step by step on checking your account's binding ids.

Once you perform these changes, remember to repeat the process from step 4 as many times as the number of existing versions of that landing page, using each alternate page as the path.

Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
Was this helpful?
Yes
No
Suggest edits (Github)
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
On this page