Skip to content

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).

License

Notifications You must be signed in to change notification settings

GrowthWizard/rankmath-headless-root-domain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages