• Resolved yichenhuang

    (@yichenhuang)


    I’m using Hostinger + WordPress + Astra + Elementor + Rank Math.
    From the beginning, I purchased and used my official domain (https://ABC.com) when installing WordPress.

    🔍 Problems:
    ▶︎ Issue 1: Canonical URL shows the wrong Hostinger domain and is uneditable

    – WordPress General Settings:
      – WordPress Address: https://ABC.com
      – Site Address: https://ABC.com
    – However, the canonical URL in page source is still showing as https://XXX.hostingersite.com/page-name.
    – The canonical URL field is grayed out and cannot be modified — possibly coming from WordPress directly.

    ▶︎ Issue 2: Canonical URL resets after editing with Rank Math

    – Even when I manually set the correct canonical URL using Rank Math.
    – I’m not sure if the cause is:
      – WordPress generating default canonical
      – Elementor rewriting it
      – Rank Math not persisting changes

    ▶︎ Issue 3: Elementor hyperlink resets to Hostinger domain

    – Even after fixing URL manually, saving via Elementor causes some links to revert to Hostinger domain.
    – Sometimes displayed correctly on frontend, sometimes not.

    ✅ Tried:

    – Verified domain settings in WordPress → General
    – Replaced URLs via Elementor → Tools → Replace URL (from Hostinger to official domain)
    – Cleared all caches (browser + server)
    – No caching plugins
    – Google search shows correct domain, but page source and SEO tools still show old canonical URL

    ❓Questions:

    1. Why is the canonical URL field in WordPress settings grayed out? Is it from WordPress core?
    2. Does Elementor overwrite canonical settings? How to prevent it?
    3. Could the old Hostinger subdomain be stored elsewhere? How to completely remove it?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Problem 1: Canonical URL shows the wrong Hostinger domain

    Why does this happen?
    The canonical tag in WordPress uses the values from home_url() and site_url(). If the canonical URL field in Rank Math is grayed out, it means that Auto Canonical is turned on and Rank Math is using the default settings from WordPress.

    Solution

    1. Update WordPress settings
      Go to Settings → General → WordPress Address and Site Address. Make sure both are set to https://ABC.com.
    2. Update the database
      The old Hostinger domain (XXX.hostingersite.com) may still be present in the database. Use the Better Search Replace plugin. Search for XXX.hostingersite.com and replace it with ABC.com. Run this on all tables, but perform a dry run first to check for any issues.
    3. Force canonical override in Rank Math
      On the page edit screen, open Rank Math, go to the Advanced tab, and locate the Canonical URL setting. Turn off Auto Canonical and enter the correct URL, for example: https://ABC.com/page-name.
    4. If Auto Canonical is grayed out
      Go to Rank Math → Titles & Meta → Posts and disable the Auto Canonical option.

    Following these steps ensures that both WordPress and Rank Math use the correct domain for canonical URLs.

    Problem 2: Canonical resets after editing in Rank Math

    Why does this happen?
    If Rank Math Auto Canonical is turned on, Elementor may re-save the post meta during edits, which can remove custom canonical URLs. There can also be conflicts if Rank Math Instant Indexing or SEO filters overwrite the settings.

    Solution

    1. Turn off Elementor dynamic tags for SEO
      Do not allow Elementor to handle SEO. Instead, let Rank Math manage it.
    2. Disable Default SEO Meta in Elementor
      Go to Elementor > Settings > Advanced and turn off the option for default SEO meta.
    3. Clear Elementor cache
      Go to Elementor > Tools and click on Regenerate CSS & Data.

    Following these steps ensures Elementor does not interfere with custom canonical URLs managed by Rank Math.

    Problem 3: Why do Elementor hyperlinks go back to the Hostinger domain?

    Why does this happen?
    Elementor stores absolute URLs in a serialized format within the database. If some widgets still point to the old Hostinger domain, it means the previous URL replacement did not update all instances.

    Solution

    1. Use Elementor’s URL Replacement tool
      Go to Elementor > Tools > Replace URL.
      From: https://XXX.hostingersite.com
      To: https://ABC.com
      Run the process again to ensure all URLs are updated.
    2. Clear caches
      Clear the Elementor cache, the Hostinger cache, and your browser cache.
    3. If the issue persists
      Use the Better Search Replace plugin on the database to update any remaining references to the old domain.

    For what reason is Canonical grayed out?
    Because Rank Math uses WordPress home_url() to automatically generate the canonical tag. To edit it manually, you need to turn off Auto Canonical in Rank Math settings.

    Does Canonical get overwritten by Elementor?
    No, Elementor itself does not overwrite canonical URLs. However, it can cause conflicts with SEO plugins by re-saving post meta fields when updates are made.

    Is it possible that the Hostinger subdomain is stored elsewhere?
    Yes, it can be stored in multiple places:

    • In the database (tables like wp_options, wp_posts, wp_postmeta)
    • In Elementor templates
    • In serialized widget data

    To completely clean up old URLs, use the Better Search Replace plugin and update all occurrences, including Rank Math meta fields.

    Thread Starter yichenhuang

    (@yichenhuang)

    Hi Kusum,

    Thank you for the detailed explanation — it’s been very helpful!

    I’d like to share an update after following all your suggested steps. Although my General Settings in WordPress were already correctly set to https://ABC.com, I still ran Better Search Replace to replace all instances of the old domain across the database — including wp_options, which completed successfully.

    I’ve also disabled Auto Canonical in Rank Math and manually set the correct canonical URLs.

    However, the issue persists:
    In WordPress > Settings > Permalinks, the Site Address still displays https://XXX.hostingersite.com and is grayed out. I can’t seem to override it.

    Do you have any idea what might still be causing this? Is there another setting I should look into or reset?

    Thanks again for your kind support!

    Thread Starter yichenhuang

    (@yichenhuang)

    Solved: WordPress Permalink stuck on Hostinger subdomain

    After trying all the recommended fixes — including:

    • Updating General Settings (WordPress & Site URLs)
    • Running Better Search Replace to replace all instances of the Hostinger domain
    • Disabling Auto Canonical in Rank Math and manually updating canonical URLs

    …I still saw https://XXX.hostingersite.com stuck in Permalink Settings (and it was grayed out, not editable).

    🔧 What finally worked:

    I went to
    Hostinger → Websites → Website List → WP Admin

    Instead of using bookmarks or cached login links, I launched the WP dashboard directly from Hostinger’s control panel. After doing this:

    • The correct domain https://yourdomain.com was reflected everywhere
    • Permalink settings no longer showed the Hostinger subdomain
    • Canonical tags and SEO tools picked up the right URL automatically

    🎉 Lesson learned:
    Sometimes it’s not just about replacing values in the database — logging in through the proper channel can reset hidden session or URL references.

    Hope this helps others facing the same frustrating issue!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WordPress Canonical URL Error Issue’ is closed to new replies.