diff --git a/bin/noblogs.in b/bin/noblogs.in
index d7e9e411208cdf2f3ebb2d4b8ba528d90c08e46f..13302a8910076341e3259e5df3ff0d651018caf7 100755
--- a/bin/noblogs.in
+++ b/bin/noblogs.in
@@ -72,6 +72,9 @@ Known commands:
       Convert Next Gen Gallery (NGG) photo galleries to stardard Wordpress
       galleries, and then notify (via email) admins of the fact.
 
+  https-siteurl BLOG
+      Adds https (instead of http) to siteurl and home options.
+
 <?php
   exit(1);
 }
@@ -435,6 +438,36 @@ function do_ngg_convert($args) {
   }
 }
 
+// replaces http with https, and removes ending slash
+function add_https_to_uri($uri){
+    $re = "http[s]?:\/\/([^.]+\.noblogs\.org)[/]?/i";
+    $subst = "https://$1";
+    return preg_replace($re,$subst,$uri);
+}
+
+// adds https to siteurl and home options
+function do_https_siteurl($args){
+    foreach ($args as $arg) {
+        $blog = noblogs_get_blog($arg);
+        if (!$blog) {
+            echo "Blog {$arg} not found.\n";
+            continue;
+        }
+        switch_to_blog($blog->blog_id);
+
+        $siteurl = get_option('siteurl');
+        $home = get_option('home');
+
+        $siteurl = add_https_to_uri($siteurl);
+        $home = add_https_to_uri($home);
+
+        update_option('siteurl', $siteurl);
+        update_option('home', $home);
+
+        echo "{$arg}: ${siteurl} | ${home}\n";
+        restore_current_blog();
+    }
+}
 
 // Command-line parsing.
 $cmd = $argv[1];
@@ -448,4 +481,3 @@ if (!function_exists($cmd_func)) {
   help();
 }
 call_user_func($cmd_func, array_slice($argv, 2));
-