diff --git a/Library/Homebrew/cask/lib/hbc/cli/home.rb b/Library/Homebrew/cask/lib/hbc/cli/home.rb
index 13b721859e37ee96b63ea33758e61d08941dcdde..4734bfebb9d6bb180e8ddb110f9d3974625852df 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/home.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/home.rb
@@ -4,7 +4,7 @@ module Hbc
       def self.run(*cask_tokens)
         if cask_tokens.empty?
           odebug "Opening project homepage"
-          system "/usr/bin/open", "--", "http://caskroom.github.io/"
+          system "/usr/bin/open", "--", "https://caskroom.github.io/"
         else
           cask_tokens.each do |cask_token|
             odebug "Opening homepage for Cask #{cask_token}"
diff --git a/Library/Homebrew/cask/lib/hbc/url.rb b/Library/Homebrew/cask/lib/hbc/url.rb
index dd34119db8679b327ca20403258ee993961595b8..07b41fb8036a1eb4a6c8815f9f46747cd67d41e9 100644
--- a/Library/Homebrew/cask/lib/hbc/url.rb
+++ b/Library/Homebrew/cask/lib/hbc/url.rb
@@ -2,7 +2,7 @@ require "forwardable"
 
 module Hbc
   class URL
-    FAKE_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10) http://caskroom.github.io".freeze
+    FAKE_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10) https://caskroom.github.io".freeze
 
     attr_reader :using, :revision, :trust_cert, :uri, :cookies, :referer, :data
 
diff --git a/Library/Homebrew/dev-cmd/aspell-dictionaries.rb b/Library/Homebrew/dev-cmd/aspell-dictionaries.rb
index 86ad037ce657df2aed4647367d25afbc4460f753..955e41b01f8d595087abbbc32c936ac83de35706 100644
--- a/Library/Homebrew/dev-cmd/aspell-dictionaries.rb
+++ b/Library/Homebrew/dev-cmd/aspell-dictionaries.rb
@@ -10,7 +10,7 @@ module Homebrew
   module_function
 
   def aspell_dictionaries
-    dict_url    = "http://ftpmirror.gnu.org/aspell/dict"
+    dict_url    = "https://ftpmirror.gnu.org/aspell/dict"
     dict_mirror = "https://ftp.gnu.org/gnu/aspell/dict"
     languages   = {}
 
diff --git a/Library/Homebrew/dev-cmd/pull.rb b/Library/Homebrew/dev-cmd/pull.rb
index 1bc87add1e23fb3d3a321648079237ac530616ef..ec89b14b886fd7d019abac7703e436841474720b 100644
--- a/Library/Homebrew/dev-cmd/pull.rb
+++ b/Library/Homebrew/dev-cmd/pull.rb
@@ -13,7 +13,7 @@
 #:
 #:      ~ The URL of a commit on GitHub
 #:
-#:      ~ A "http://bot.brew.sh/job/..." string specifying a testing job ID
+#:      ~ A "https://bot.brew.sh/job/..." string specifying a testing job ID
 #:
 #:    If `--bottle` is passed, handle bottles, pulling the bottle-update
 #:    commit and publishing files on Bintray.
diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb
index 5ac57273a05a6cce7647792672867aa57cfc51f5..c8c4b83d248604943e9ad22208aa8ec37e8a29d9 100644
--- a/Library/Homebrew/diagnostic.rb
+++ b/Library/Homebrew/diagnostic.rb
@@ -647,7 +647,7 @@ module Homebrew
 
             Setting DYLD_INSERT_LIBRARIES can cause Go builds to fail.
             Having this set is common if you use this software:
-              #{Formatter.url("http://asepsis.binaryage.com/")}
+              #{Formatter.url("https://asepsis.binaryage.com/")}
           EOS
         end
 
diff --git a/Library/Homebrew/extend/os/mac/hardware/cpu.rb b/Library/Homebrew/extend/os/mac/hardware/cpu.rb
index f759895c7b3d661b31698c965afc8ba86100e56b..f180995fbb0f7ba85d3fd8110889ba1346025d4b 100644
--- a/Library/Homebrew/extend/os/mac/hardware/cpu.rb
+++ b/Library/Homebrew/extend/os/mac/hardware/cpu.rb
@@ -102,7 +102,7 @@ module Hardware
           # Amazingly, this order (64, then 32) matters. It shouldn't, but it
           # does. GCC (some versions? some systems?) can blow up if the other
           # order is used.
-          # http://superuser.com/questions/740563/gcc-4-8-on-macos-fails-depending-on-arch-order
+          # https://superuser.com/questions/740563/gcc-4-8-on-macos-fails-depending-on-arch-order
           [arch_64_bit, arch_32_bit].extend ArchitectureListExtension
         end
       end
diff --git a/Library/Homebrew/keg_relocate.rb b/Library/Homebrew/keg_relocate.rb
index d17e7f75a919f94342430553745b81d72405c2f2..834cda7684c218196e5fc901ea90b234f2c2fbc0 100644
--- a/Library/Homebrew/keg_relocate.rb
+++ b/Library/Homebrew/keg_relocate.rb
@@ -119,7 +119,7 @@ class Keg
     # file has known issues with reading files on other locales. Has
     # been fixed upstream for some time, but a sufficiently new enough
     # file with that fix is only available in macOS Sierra.
-    # http://bugs.gw.com/view.php?id=292
+    # https://bugs.gw.com/view.php?id=292
     with_custom_locale("C") do
       files = Set.new path.find.reject { |pn|
         next true if pn.symlink?
diff --git a/Library/Homebrew/manpages/brew-cask.1.md b/Library/Homebrew/manpages/brew-cask.1.md
index 5ca863815c47f58d5bf1ff452e6099ff3c910f9e..56781bd7696ff3345f4c8febe97ef895662ae5d7 100644
--- a/Library/Homebrew/manpages/brew-cask.1.md
+++ b/Library/Homebrew/manpages/brew-cask.1.md
@@ -64,7 +64,7 @@ names, and other aspects of this manual are still subject to change.
   * `home` or `homepage` [ <token> ... ]:
     Display the homepage associated with a given Cask in a browser.
 
-    With no arguments, display the project page <http://caskroom.github.io>.
+    With no arguments, display the project page <https://caskroom.github.io/>.
 
   * `info` or `abv` <token> [ <token> ... ]:
     Display information about the given Cask.
@@ -248,7 +248,7 @@ Environment variables specific to Homebrew-Cask:
 
 ## SEE ALSO
 
-The Homebrew-Cask home page: <http://caskroom.github.io>
+The Homebrew-Cask home page: <https://caskroom.github.io/>
 
 The Homebrew-Cask GitHub page: <https://github.com/caskroom/homebrew-cask>
 
diff --git a/Library/Homebrew/test/cask/cli/home_spec.rb b/Library/Homebrew/test/cask/cli/home_spec.rb
index 5208b33900498d2fe8385ea14a9a928c9d70cf94..7be26dd4c27aa795c0bea046abf494212fdf254f 100644
--- a/Library/Homebrew/test/cask/cli/home_spec.rb
+++ b/Library/Homebrew/test/cask/cli/home_spec.rb
@@ -40,7 +40,7 @@ describe Hbc::CLI::Home, :cask do
   it "opens the project page when no Cask is specified" do
     Hbc::CLI::Home.run
     expect(Hbc::CLI::Home.system_commands).to eq [
-      ["/usr/bin/open", "--", "http://caskroom.github.io/"],
+      ["/usr/bin/open", "--", "https://caskroom.github.io/"],
     ]
   end
 end
diff --git a/Library/Homebrew/test/cask/download_strategy_spec.rb b/Library/Homebrew/test/cask/download_strategy_spec.rb
index 0d92b74ec6f3afc59a95ac733bd71dbf9f72d61c..416a830eae41a2395c5f07e214cfccf2affce3fa 100644
--- a/Library/Homebrew/test/cask/download_strategy_spec.rb
+++ b/Library/Homebrew/test/cask/download_strategy_spec.rb
@@ -60,7 +60,7 @@ describe "download strategies", :cask do
           downloader.fetch
         end
 
-        expect(curl_args.each_cons(2)).to include(["-A", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10) http://caskroom.github.io"])
+        expect(curl_args.each_cons(2)).to include(["-A", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10) https://caskroom.github.io"])
       end
     end
 
diff --git a/Library/Homebrew/vendor/macho/macho/utils.rb b/Library/Homebrew/vendor/macho/macho/utils.rb
index deb4c9c665e6918116a9be7403aa64c48b8b5c80..cedd0bc1cf3848dace0e6f0d064ea8b9409fe570 100644
--- a/Library/Homebrew/vendor/macho/macho/utils.rb
+++ b/Library/Homebrew/vendor/macho/macho/utils.rb
@@ -5,7 +5,7 @@ module MachO
     # @param value [Fixnum] the number being rounded
     # @param round [Fixnum] the number being rounded with
     # @return [Fixnum] the rounded value
-    # @see http://www.opensource.apple.com/source/cctools/cctools-870/libstuff/rnd.c
+    # @see https://www.opensource.apple.com/source/cctools/cctools-870/libstuff/rnd.c
     def self.round(value, round)
       round -= 1
       value += round
diff --git a/Library/Homebrew/version.rb b/Library/Homebrew/version.rb
index 77f270dd9af62367cc63b1a82de6599dabac05b1..b9f512a50cfdbf041ed0f58a597c1614fa32931d 100644
--- a/Library/Homebrew/version.rb
+++ b/Library/Homebrew/version.rb
@@ -360,8 +360,8 @@ class Version
     m = /-((?:\d+\.)*\d+-(?:alpha|beta|rc)\d*)$/.match(stem)
     return m.captures.first unless m.nil?
 
-    # e.g. http://ftpmirror.gnu.org/libidn/libidn-1.29-win64.zip
-    # e.g. http://ftpmirror.gnu.org/libmicrohttpd/libmicrohttpd-0.9.17-w32.zip
+    # e.g. https://ftpmirror.gnu.org/libidn/libidn-1.29-win64.zip
+    # e.g. https://ftpmirror.gnu.org/libmicrohttpd/libmicrohttpd-0.9.17-w32.zip
     m = /-(\d+\.\d+(?:\.\d+)?)-w(?:in)?(?:32|64)$/.match(stem)
     return m.captures.first unless m.nil?
 
@@ -372,11 +372,11 @@ class Version
     m = /\.(\d+\.\d+(?:\.\d+)?)\+opam$/.match(stem)
     return m.captures.first unless m.nil?
 
-    # e.g. http://ftpmirror.gnu.org/mtools/mtools-4.0.18-1.i686.rpm
-    # e.g. http://ftpmirror.gnu.org/autogen/autogen-5.5.7-5.i386.rpm
-    # e.g. http://ftpmirror.gnu.org/libtasn1/libtasn1-2.8-x86.zip
-    # e.g. http://ftpmirror.gnu.org/libtasn1/libtasn1-2.8-x64.zip
-    # e.g. http://ftpmirror.gnu.org/mtools/mtools_4.0.18_i386.deb
+    # e.g. https://ftpmirror.gnu.org/mtools/mtools-4.0.18-1.i686.rpm
+    # e.g. https://ftpmirror.gnu.org/autogen/autogen-5.5.7-5.i386.rpm
+    # e.g. https://ftpmirror.gnu.org/libtasn1/libtasn1-2.8-x86.zip
+    # e.g. https://ftpmirror.gnu.org/libtasn1/libtasn1-2.8-x64.zip
+    # e.g. https://ftpmirror.gnu.org/mtools/mtools_4.0.18_i386.deb
     m = /[-_](\d+\.\d+(?:\.\d+)?(?:-\d+)?)[-_.](?:i[36]86|x86|x64(?:[-_](?:32|64))?)$/.match(stem)
     return m.captures.first unless m.nil?
 
diff --git a/docs/Gems,-Eggs-and-Perl-Modules.md b/docs/Gems,-Eggs-and-Perl-Modules.md
index f86124f6696b1160de641580d921c8f494ee96b9..07d810c77e9bdccbc7d22b4e6fc233b6ed3b2019 100644
--- a/docs/Gems,-Eggs-and-Perl-Modules.md
+++ b/docs/Gems,-Eggs-and-Perl-Modules.md
@@ -131,7 +131,7 @@ If you don’t even want (or can’t) use sudo for bootstrapping
 
 Another alternative is to use `perlbrew` to install a separate copy of Perl in your home directory, or wherever you like :
 ```bash
-curl -kL http://install.perlbrew.pl | bash
+curl -L https://install.perlbrew.pl | bash
 perlbrew install perl-5.16.2
 echo ".~/perl5/perlbrew/etc/bashrc" >> ~/.bashrc
 ```
diff --git a/docs/Python-for-Formula-Authors.md b/docs/Python-for-Formula-Authors.md
index 0867e8dd8048c0a439e8c79ee384e13629566d39..7f650f967fb8f88c0b1f5b674d288ec464405bb0 100644
--- a/docs/Python-for-Formula-Authors.md
+++ b/docs/Python-for-Formula-Authors.md
@@ -213,7 +213,7 @@ Distribute (not to be confused with distutils) is an obsolete fork of setuptools
 
 ## What is `--single-version-externally-managed`?
 
-`--single-version-externally-managed` ("SVEM") is a setuptools-only [argument to setup.py install](http://setuptools.readthedocs.io/en/latest/setuptools.html?#install-run-easy-install-or-old-style-installation). The primary effect of SVEM is to use distutils to perform the install instead of using setuptools' `easy_install`.
+`--single-version-externally-managed` ("SVEM") is a setuptools-only [argument to setup.py install](https://setuptools.readthedocs.io/en/latest/setuptools.html?#install-run-easy-install-or-old-style-installation). The primary effect of SVEM is to use distutils to perform the install instead of using setuptools' `easy_install`.
 
 `easy_install` does a few things that we need to avoid:
 
diff --git a/docs/_layouts/index.html b/docs/_layouts/index.html
index 44debdc5f912a7e103ec1061e25a80a29f095a21..57071828764c52ca8aef1744bacc25b853fc8df0 100644
--- a/docs/_layouts/index.html
+++ b/docs/_layouts/index.html
@@ -115,7 +115,7 @@ end
       <div class="group row">
         <h2 id="further-doc">{{ page.pagecontent.doc.further }}</h2>
         <div class="button">
-          <p><a href="http://docs.brew.sh">docs.brew.sh</a></p>
+          <p><a href="http://docs.brew.sh/">docs.brew.sh</a></p>
         </div>
       </div>
     </li>
@@ -124,7 +124,7 @@ end
       <div class="group row">
         <h2 id="homebrew-community">{{ page.pagecontent.doc.community }}</h2>
         <div class="button">
-          <p><a href="http://discourse.brew.sh">discourse.brew.sh</a></p>
+          <p><a href="https://discourse.brew.sh/">discourse.brew.sh</a></p>
         </div>
       </div>
     </li>
diff --git a/docs/brew.1.html b/docs/brew.1.html
index 7a06426ae8a76d24d8d59754c3db77cc84abed5f..2d2361012f7424beb1b027b9b49f842273e9dc96 100644
--- a/docs/brew.1.html
+++ b/docs/brew.1.html
@@ -592,7 +592,7 @@ Optionally, installs the formulae changed by the patch.</p>
 
 <p>  ~ The URL of a commit on GitHub</p>
 
-<p>  ~ A "http://bot.brew.sh/job/..." string specifying a testing job ID</p>
+<p>  ~ A "https://bot.brew.sh/job/..." string specifying a testing job ID</p>
 
 <p>If <code>--bottle</code> is passed, handle bottles, pulling the bottle-update
 commit and publishing files on Bintray.</p>
diff --git a/manpages/brew-cask.1 b/manpages/brew-cask.1
index 64ff39c59b33f2722917215c3370d437396fdf9b..c5708f7cbdef3e7c2f3bb3b8a51267d8421b57d1 100644
--- a/manpages/brew-cask.1
+++ b/manpages/brew-cask.1
@@ -67,7 +67,7 @@ Download remote application files for the given Cask to the local cache\. With \
 Display the homepage associated with a given Cask in a browser\.
 .
 .IP
-With no arguments, display the project page \fIhttp://caskroom\.github\.io\fR\.
+With no arguments, display the project page \fIhttps://caskroom\.github\.io/\fR\.
 .
 .TP
 \fBinfo\fR or \fBabv\fR \fItoken\fR [ \fItoken\fR \.\.\. ]
@@ -288,7 +288,7 @@ This variable may contain any arguments normally used as options on the command\
 
 .
 .SH "SEE ALSO"
-The Homebrew\-Cask home page: \fIhttp://caskroom\.github\.io\fR
+The Homebrew\-Cask home page: \fIhttps://caskroom\.github\.io/\fR
 .
 .P
 The Homebrew\-Cask GitHub page: \fIhttps://github\.com/caskroom/homebrew\-cask\fR
diff --git a/manpages/brew.1 b/manpages/brew.1
index 7cad1057135b86b4cb60a892b822880489ba9903..bdda89fb0a097e1129cbab4a19736eef5f98b1e4 100644
--- a/manpages/brew.1
+++ b/manpages/brew.1
@@ -786,7 +786,7 @@ Each \fIpatch\-source\fR may be one of:
 ~ The URL of a commit on GitHub
 .
 .IP
-~ A "http://bot\.brew\.sh/job/\.\.\." string specifying a testing job ID
+~ A "https://bot\.brew\.sh/job/\.\.\." string specifying a testing job ID
 .
 .IP
 If \fB\-\-bottle\fR is passed, handle bottles, pulling the bottle\-update commit and publishing files on Bintray\.