Skip to content

Commit

Permalink
[docs] Use https for sitemap URLs (#17158)
Browse files Browse the repository at this point in the history
## Summary & Motivation

I have a hunch that our search crawler is failing to make proper use of
our sitemap.xml. I think it may be because the sitemap exclusively uses
`http://` URLs instead of `https://`, even though all of these URLs will
307 -> 302 to `https`.

I'm changing the sitemap generator to use `https` instead.

## How I Tested These Changes

View sitemap.xml locally and in preview, verify that the URLs look
correct.
  • Loading branch information
hellendag authored and yuhan committed Oct 12, 2023
1 parent 1aa13d3 commit 343fe4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/next/pages/sitemap.xml.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {latestAllPaths} from 'util/navigation';

const toUrl = (host, route) => `<url><loc>http://${host}${route}</loc></url>`;
const toUrl = (host, route) => `<url><loc>https://${host}${route}</loc></url>`;

const createSitemap = (host, routes) =>
`<?xml version="1.0" encoding="UTF-8"?>
Expand Down

0 comments on commit 343fe4b

Please sign in to comment.