Writing Clear WordPress Documentation for End Users
People who use WordPress to publish or manage a site need instructions that match their task and the controls on their screen.…
If Yoast SEO lists your page URLs with http:// while your WordPress site should use https://, check WordPress’s URL settings and HTTPS detection first. Yoast says its sitemap uses the protocol in the WordPress Site Address, so an HTTP entry often points to a configuration mismatch.
An XML sitemap is a file that lists pages you want search engines to find. When you inspect one, look at the page addresses inside <loc> tags. The string http:// in the sitemap’s XML namespace declaration is part of the file format, not a page URL. Changing actual HTTP page entries to HTTPS helps your sitemap match your preferred URLs. It does not guarantee that Google will index those pages.
Open your sitemap index, commonly at https://example.com/sitemap_index.xml, then open a child sitemap for posts or pages. Inspect the values between <loc> and </loc>. For example:
https://example.com/example-page/
Here, the namespace uses http://, but the page URL uses https://. That is valid. Google’s sitemap documentation also shows an HTTP namespace alongside an HTTPS page URL. If your <loc> entries already use HTTPS, the namespace is not a problem.
In WordPress, open Settings → General and check WordPress Address (URL) and Site Address (URL). The WordPress Address points to the WordPress files; the Site Address is the public address visitors use. For an HTTPS site, make sure each setting has the intended protocol and hostname, including the correct www or non-www version.
The two addresses are often the same, but they can differ when WordPress is installed in its own directory. Keep that distinction if it applies to your site. Yoast’s sitemap troubleshooting guidance identifies the WordPress Site Address as the setting that determines the sitemap protocol.
If WordPress does not let you edit either field, check wp-config.php for the WP_HOME and WP_SITEURL constants. These constants can override the dashboard values. The public site address and WordPress file location determine whether the two values should match, so confirm both before changing them. WordPress documents both URL settings and their configuration in its General Settings documentation.
A reverse proxy or load balancer sits between visitors and WordPress. It can receive visitors’ HTTPS requests, then connect to WordPress over HTTP. If WordPress does not receive or recognize that the visitor used HTTPS, it can treat the request as HTTP. WordPress’s HTTPS guidance describes configurations that use the HTTP_X_FORWARDED_PROTO header to communicate the original protocol.
If your site uses a proxy or CDN, ask your host or server administrator to confirm that the proxy sends this header and that WordPress accepts it only from infrastructure you control. A forwarded-protocol header supplied by an arbitrary visitor should not determine whether WordPress treats a request as secure.
After correcting the URL configuration, reopen the sitemap and check the <loc> values. If they still show the old URLs, clear the relevant WordPress, server, or CDN cache. Yoast notes that caching can delay sitemap updates.
Then check three things: a representative HTTPS page should load, its HTTP version should redirect to HTTPS, and its canonical tag should point to the HTTPS URL. A canonical tag tells search engines which URL to prefer when similar page URLs exist. Google treats sitemap inclusion as a signal about preferred URLs, but its canonicalization guidance makes clear that Google selects canonicals based on multiple signals.
Submit the corrected sitemap under the HTTPS site in Search Console. For submission steps, see submitting a Yoast sitemap to Google Search Console. Google treats a sitemap as a hint, not a promise that every listed page will be crawled or indexed.
If the problem began after an HTTP-to-HTTPS migration, old URLs may remain in the WordPress database. First correct WordPress’s site URL settings. Then check whether the database still contains old URLs that need replacing. Back up the database before making bulk changes, and use WP-CLI, WordPress’s command-line tool, with the --dry-run option to preview the replacement without changing the database:
wp search-replace 'http://example.com' 'https://example.com' --dry-run
Review the preview and confirm that the old and new hostnames match your migration. Only then run the command without --dry-run. WP-CLI’s search-replace command handles serialized data, a format WordPress uses to store structured values. If WordPress runs several sites as a multisite installation, or your site uses custom tables, review the results carefully. Yoast also covers migration steps in its guide to moving a WordPress site from HTTP to HTTPS.
Give Vroni a GitHub issue, bug report, spec, or rough idea. It reads the repo, plans the change, writes code, runs checks, and works toward a review-ready pull request.
Take a look at vroni.com