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.
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
- Install the
vtex.admin-graphql-ide@3.x
app using your terminal. - In your browser, access your account's admin and go to the GraphQL IDE section.
- From the GraphQL IDE dropdown list, choose the
vtex.rewriter
app. - 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.
- Save the returned data.
- Erase the previous query and fill in the main text box with the following mutation command.
_10mutation saveInternal($args: InternalInput!) {_10 internal {_10 save(route: $args) {_10 id_10 }_10 }_10}
- 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
, andbinding
values with the information obtained in step 4. - Regarding the
alternates
field, fill in thebinding
andpath
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'sbinding
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
.