SEO
Old addresses keep working
Section titled “Old addresses keep working”When a site moves to tourpingo, its old addresses must still lead somewhere. The seller lists them in the portal; before your site answers 404, ask where a path went:
curl "https://api.stg.vacationpackagesoman.com/v1/public/redirect?path=%2Ftours%2Fdesert-safari.html" \ -H "Tp-Publishable-Key: $TP_KEY"const res = await fetch("https://api.stg.vacationpackagesoman.com/v1/public/redirect?path=%2Ftours%2Fdesert-safari.html", { headers: { "Tp-Publishable-Key": process.env.TP_KEY!, },})const answer = await res.json()Answer: 200 OK
{ "to": "/en/trips/desert-safari-with-bbq-dinner", "code": 301}Answer with the code (301 for a permanent move, 302 for a passing
one) and to as the Location. When the path doesn’t redirect the API
answers 404, and your site shows its own 404 page.
Sitemaps
Section titled “Sitemaps”- Trips: page through
GET /v1/public/productswithlimit=100andnext_cursor; each trip’slocalessays which languages it is published in. - Pages:
GET /v1/public/pages, which leaves out pages that ask not to be listed.
Languages
Section titled “Languages”A trip page in a language the trip isn’t published in shows English text (languages). For such a page:
- add
noindexfor that language, and leave it out of the sitemap; - give
hreflangalternates only for the trip’slocales.
Titles and descriptions
Section titled “Titles and descriptions”- Pages carry
seo:meta_title(up to 60 characters shows in full),meta_description(up to 160),canonical_urlwhen the same content lives at another address, andnoindex. - Trips have no SEO fields of their own: use the
title, and thesummaryfor the description.
Render trip and list pages on your server, and cache catalog reads for a short time. Never cache a quote, a hold or a booking. Cache headers on catalog reads are coming with issue #531.