Title: Adding a link should check for &quot;http://&quot;
Last modified: August 20, 2016

---

# Adding a link should check for "http://"

 *  [jimmerd](https://wordpress.org/support/users/jimmerd/)
 * (@jimmerd)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/adding-a-link-should-check-for-http/)
 * One of WordPress’s great strengths is that it works beautifully for idiot users.
   This is (in my experience) where other CMSs fall down.
 * But one part that could be made more idiot-proof is adding links.
 * I can’t tell you how many times one of my clients has added a link and it breaks
   for lack of “[http://&#8221](http://&#8221); at the beginning.
 * So somebody selects the text and clicks the ADD LINK button and types in “google.
   com”, tests the post and it goes to “[http://theclientsite.com/google.com&#8221](http://theclientsite.com/google.com&#8221);
 * My suggestion: the code should check links for “.com, .org, .net, etc.” and if
   it finds that, either ask “Do you want to link to [http://google.com&#8221](http://google.com&#8221);
   or just ensure that the http:// is there. I think adding http would be safe as
   it’s very unlikely that if a link contains .com the user wanted to keep us within
   their own site.
 * Hope this helps,
    Jim

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/adding-a-link-should-check-for-http/#post-3373556)
 * > So somebody selects the text and clicks the ADD LINK button and types in “google.
   > com”, tests the post and it goes to “[http://theclientsite.com/google.com&#8221](http://theclientsite.com/google.com&#8221);
 * So why aren’t they adding their url to the `http://` that’s already present in
   the popup window? Isn’t this really a case of users not actually reading the 
   screen properly? Because, at the end of the day, there’s really no cure for this.
 * > I think adding http would be safe as it’s very unlikely that if a link contains.
   > com the user wanted to keep us within their own site.
 * I disagree. http is not the only protocol that can be used to create a link.
 *  Thread Starter [jimmerd](https://wordpress.org/support/users/jimmerd/)
 * (@jimmerd)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/adding-a-link-should-check-for-http/#post-3373570)
 * I agree that it’s their own fault. But when it happens repeatedly (and believe
   me, it does), can’t those who designed the system take another look?
 * I am also well aware that if you make things idiot-proof, the Flying Spaghetti
   Monster just creates a better idiot.
 * Also, the http:// that’s already there is also pre-selected. So if someone starts
   typing or pastes a URL without first clicking at the end of it, the http:// is
   wiped out.
 * And yes, other protocols would have to be taken care of but that should also 
   be easy.
 * I don’t know enough PHP to try to write a plugin to do this but for me it would
   be something like:
 * When someone tries to insert a link:
    a. check if the link contains a top-level
   domain: .com, .org, .net b. if it does, ensure that it also contains a protocol
   c. if a but not b, prompt the user that they should add this unless it’s REALLY
   a local, relative link
 * I’m open to the idea that this may be a stupid idea. But I’ve seen this mistake
   so often (twice today on different sites) that I can’t help thinking we can help
   people with a little code.
 * Thanks for your time,
    Jim
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [13 years, 4 months ago](https://wordpress.org/support/topic/adding-a-link-should-check-for-http/#post-3373723)
 * This comes up now and again. The reason we don’t is … well, what if you wanted
   relative links? We try hard not to assume we know intent in these cases 🙂 If
   I want a link to be /about and not [http://ipstenu.org/about](http://ipstenu.org/about),
   WP should honor me.

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

The topic ‘Adding a link should check for "http://"’ is closed to new replies.

## Tags

 * [HTTP](https://wordpress.org/support/topic-tag/http/)
 * [link](https://wordpress.org/support/topic-tag/link/)

 * In: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
 * 3 replies
 * 3 participants
 * Last reply from: [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/adding-a-link-should-check-for-http/#post-3373723)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
