Title: How to replace http:// to //
Last modified: August 31, 2016

---

# How to replace http:// to //

 *  [Group Of Oceninfo](https://wordpress.org/support/users/princebhalani143/)
 * (@princebhalani143)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/how-to-replace-http-to/)
 * Hello Experts,
 * I want to replace all theme file URL http:// to //
 * From
    <img src=”[http://example.com/image.jpg&#8221](http://example.com/image.jpg&#8221);
   alt=”image”>
 * To
    <img src=”//example.com/image.jpg” alt=”image”>
 * Automatically Change All URL from HTTP:// to //
 * Is there any script which one I can add into function.php and it’ll work accordingly.
 * I get “insecure content” warnings from some of my content
    We are probably loading
   content (such as images) with a URL that starts with “http:”. Take that bit away,
   but leave the slashes, e.g. //www.example.com/image.png; our browser will load
   the content, using HTTPS when your page uses it.
 * Thanks,
    Group Of Oceninfo

The topic ‘How to replace http:// to //’ is closed to new replies.

## Tags

 * [function.php](https://wordpress.org/support/topic-tag/function-php/)
 * [HTTP](https://wordpress.org/support/topic-tag/http/)
 * [HTTPS](https://wordpress.org/support/topic-tag/https/)
 * [url](https://wordpress.org/support/topic-tag/url/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [Group Of Oceninfo](https://wordpress.org/support/users/princebhalani143/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/how-to-replace-http-to/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
