Breaking News
Home » Digital » How to Code URLS without HTTP: or HTTPS:
HTML Coding Tutorial

How to Code URLS without HTTP: or HTTPS:

Here’s a quick tip for using a different way to link to content within HTML code. Essentially you are creating an absolute URL without protocol.

While it’s traditional to structure URLs in links with the inclusion of http:// or https://, it is no longer completely necessary.

Instead, today you can simply use the //

Click here for a live demo.

(Hippies' Note: If you enjoy reading our articles, you'll love our newsletter. Receive updates directly to your inbox. Subscribe now!)


The number one benefit in using this shorthand URL structure is for your own website(s) using SSL Certificates for security purposes. You can avoid the dreaded “This page contains both secure and nonsecure items.” error message if you *forget* to correctly link to internal files, such as images or Javascript using http:// instead of https://.

Security Information Warning Displaying Unsecure Elements

Some of the benefits include:

  • Less typing required
  • Less errors for website visitors
  • Slightly smaller files since you are omitting 5 characters from every link URL

Disadvantages: IE6, IE7 and IE8

As with all websites it’s important to be cross browser compatible. However, if you are going to get an error it will (most likely) be caused within Internet Explorer. This tip also has issues pertaining to three Internet Explorer versions; IE6, IE7, and IE8.

  • IE6 has an edge error. This is slightly complicated to explain, but Paul Irish does it well here.
  • IE7 and IE8 will download the stylesheet twice if you use a <link>¬†element or @import.

Do you still use Internet Explorer for browsing the web? If so, which version?

Subscribe to our mailing list

I'm interested in...

About Brianne

Born and raised in Orange County, California, I am definitely a "summer" girl at heart. Today I am a full-time mother to a rambunctious two-year old living in a RV. Together Branndon and I are learning how to become financial and location independent.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

CommentLuv badge