最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Why WordPress automatically removes http from the url of my website's sub domain?

programmeradmin1浏览0评论

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
Add a comment  | 

3 Answers 3

Reset to default 1

You 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

发布评论

评论列表(0)

  1. 暂无评论