diff --git a/bin/start b/bin/start
index d3cb9795c8c6cf9460baca533d7fcee8c6c27f88..8301a047b22a4f746d68adcd1bee3b19c1a6ea0d 100755
--- a/bin/start
+++ b/bin/start
@@ -13,7 +13,13 @@ fi
 
 # Heroku Postgres
 if [ "$DATABASE_URL" ]; then
-    export MB_DB_CONNECTION_URI="$DATABASE_URL"
+    if [[ $string == *"?"* ]]; then
+        # if DATABASE_URL already has a query string don't mess with it
+        export MB_DB_CONNECTION_URI="$DATABASE_URL"
+    else
+        # otherwise add the SSL parameters to ensure upgraded databases work on Heroku
+        export MB_DB_CONNECTION_URI="$DATABASE_URL?ssl=true&sslmode=require&sslfactory=org.postgresql.ssl.NonValidatingFactory"
+    fi
 fi
 
 # Mailgun (Heroku)