I am witnessing a strange problem in WordPress which automatically removes 'http' from my sub domain link. I don't know why this is happening.
Note that my domain is https while it's subdomain is http.
My WordPress is installed in my main domain. When I add the below url of my sub domain to any post:
<a href="/">DEMO</a>
Then it automatically converts it to:
<a href="//www.demo.yogihosting/jquery/jquery-removedata/">DEMO</a>
See that the http is gone from the URL.
Also see this below gif image which lists this problem:
Why this is happening and how to solve this problem.
I am witnessing a strange problem in WordPress which automatically removes 'http' from my sub domain link. I don't know why this is happening.
Note that my domain is https while it's subdomain is http.
My WordPress is installed in my main domain. When I add the below url of my sub domain to any post:
<a href="http://www.demo.yogihosting/jquery/jquery-removedata/">DEMO</a>
Then it automatically converts it to:
<a href="//www.demo.yogihosting/jquery/jquery-removedata/">DEMO</a>
See that the http is gone from the URL.
Also see this below gif image which lists this problem:
Why this is happening and how to solve this problem.
Share Improve this question edited Sep 13, 2019 at 11:42 fuxia♦ 107k39 gold badges255 silver badges459 bronze badges asked Sep 13, 2019 at 11:40 Diana PentyDiana Penty 312 bronze badges 1- 2 Welcome to WordPress Development. I hope you find the answer(s) you are looking for. Our site is different from most - if you have not done so yet, consider checking out the tour and help center to find out how things work. – Matthew Brown aka Lord Matt Commented Sep 13, 2019 at 14:24
3 Answers
Reset to default 1You might find that you do not want to solve this one. Links starting //example are protocol agnostic. This means it will load over whatever the site it is on loads over. Be that http, https, or some truly esoteric.
You should find that links like this work in both secure and insecure connections just fine. It looks odd if you have never seen it before but it works really well.
Are you using any SSL plugin? If not it might be becauee you enabled Full or flexible SSL in Cloudflare.
Dude, why would you add www in front of your subdomain? zeez