https://github.com/growthwizard/rankmath-headless-root-domain
A little code snippet to replace the domain of a headless-backend (subdomain.example.de/subpage) in RankMath to the root domain, while keeping the uri (example.de/subpage).
https://github.com/growthwizard/rankmath-headless-root-domain
headless headless-cms rank-math wordpress
Last synced: 2 months ago
JSON representation
A little code snippet to replace the domain of a headless-backend (subdomain.example.de/subpage) in RankMath to the root domain, while keeping the uri (example.de/subpage).
- Host: GitHub
- URL: https://github.com/growthwizard/rankmath-headless-root-domain
- Owner: GrowthWizard
- License: gpl-3.0
- Created: 2022-11-28T08:55:04.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-14T00:01:04.000Z (about 3 years ago)
- Last Synced: 2025-12-27T09:56:28.757Z (6 months ago)
- Topics: headless, headless-cms, rank-math, wordpress
- Language: PHP
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Description
A little code snippet to replace the domain of a headless-wordpress-backend (subdomain.example.de/subpage) in RankMath to the root domain, while keeping the uri (example.de/subpage).
# How-to-Use
1. Upload the rank-math.php to your /wp-content/themes directory. For more information about rank-math.php, check the documentation: https://rankmath.com/kb/filters-hooks-api-developer/
2. Replace the String inside of the variable $frontend_domain in rank-math.php to the root domain of your frontend.
3. Check the head of your website. All Canonicals (including on subpages) should now point to the frontend of your headless-website.