• thezeal

    (@thezeal)


    Hi all, I have noticed a problem when I view source of any page on my wordpress site.

    The issue is when I view source, any code that is referencing my own domain are shown as such:

    href=”//domain.com” Note how this is not an absolute reference and is missing the http: . I believe that although the site is functioning properly, when it comes to canonicals this is bad as Google prefers absolute URL’s with the http: etc. Coincidentally this has caused ranking issues.

    How can I fix this back to normal? Thank you!

Viewing 12 replies - 1 through 12 (of 12 total)
  • ashiquzzaman

    (@ashiquzzaman)

    Try disabling your plugins one by one and see if the issue resolves or not, alternatively you can change to default WordPress theme(tweentysixteen) and then revert back to your theme. Let me know how’s work out for you.

    Post your site address

    Thread Starter thezeal

    (@thezeal)

    Thanks for your suggestions. Is there any risk to the site by changing themes to WordPress’ default theme and back in terms of SEO/Code/plugin conflict?

    Ideally if there is a less invasive way that would be better.

    I’ve tried deactivating the plugins one by one that didn’t do it.

    ashiquzzaman

    (@ashiquzzaman)

    Nope, there’s no risk in terms of SEO

    Thread Starter thezeal

    (@thezeal)

    Ok it’s the Cloudflare plugin! The only one I didn’t try.

    When I deactivate it, everything shows fine. But I need this plugin, any suggestion?

    ashiquzzaman

    (@ashiquzzaman)

    Glad to know that you’ve sorted it out, May be try posting in their support forum – https://www.ads-software.com/support/plugin/cloudflare

    Thread Starter thezeal

    (@thezeal)

    Ok thank you very much ashiq, I will try that next. I actually found an article on cloudflare that talks about them leaving out the http: and how it affects canonicals but I don’t understand it.

    article:
    https://blog.cloudflare.com/flexible-ssl-wordpress-fixing-mixed-content-errors/

    Thread Starter thezeal

    (@thezeal)

    I fixed it! The problem was a setting that was enabled called.
    HTTPS Protocol Rewriting: It was turned ON, turned it off and canonical url is now absolute, how it should be. This setting was for SSL which I don’t have.

    ashiquzzaman

    (@ashiquzzaman)

    Glad to hear that ??

    jejani

    (@jejani)

    @thezeal, keep in mind that it’s not a “fix” because that feature is in fact very useful for sites over HTTPS. In other words when you say that URLs “should be absolute” this is not true and relative resources are in fact becoming more preferred in many cases.

    Anyway, glad you figured it out but it’s not usually necessary to change —

    Thread Starter thezeal

    (@thezeal)

    @jejani I get your point, the reason I was looking to resolve this in the first place is because
    a) my site has been unstable ever since this setting was turned on
    b) Google is shortening my URL to a category name that the post is filed under, which is in fact hurting my rankings. I suspect that maybe not having absolute canonical URL’s is confusing Google so it’s choosing a category name and shortening how my URL structure shows? I don’t know why it’s happening even now

    Example:
    When my post appears in search results as
    “domain.com/the-finest-example-domain” (more descriptive and long)
    my site ranks high for its keywords

    However for some reason it has been showing like this now
    “domain.com > example domains” [‘example domains’ is a category that the post is filed under] When this URL structure appears rather than the one above, the rankings are much much lower and thus is a problem for me right now. I’m not sure what is causing this and it’s troubling, that’s why I thought to try this.

    Do you or anyone have any idea why this happening?

    Thanks

    jejani

    (@jejani)

    Thread Starter thezeal

    (@thezeal)

    @jejani thanks, I have posted my reply to you in that thread.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Strange URL structure’ is closed to new replies.