diff --git a/classes/config.php b/classes/config.php
index 4ae4a24072f366286af1909c4ea51ecd00fbe362..be4ecde367161149ef66dd7a4d4a550c7255abeb 100644
--- a/classes/config.php
+++ b/classes/config.php
@@ -170,6 +170,9 @@ class Config {
 	const AUTH_MIN_INTERVAL = "AUTH_MIN_INTERVAL";
 	// minimum amount of seconds required between authentication attempts
 
+	const HTTP_USER_AGENT = "HTTP_USER_AGENT";
+	// http user agent (changing this is not recommended)
+
 	// default values for all of the above:
 	private const _DEFAULTS = [
 		Config::DB_TYPE => [ "pgsql", 									Config::T_STRING ],
@@ -224,6 +227,8 @@ class Config {
 		Config::CHECK_FOR_PLUGIN_UPDATES => [ "true",				Config::T_BOOL ],
 		Config::ENABLE_PLUGIN_INSTALLER => [ "true",					Config::T_BOOL ],
 		Config::AUTH_MIN_INTERVAL => [ 5,								Config::T_INT ],
+		Config::HTTP_USER_AGENT => [ 'Tiny Tiny RSS/%s (https://tt-rss.org/)',
+																					Config::T_STRING ],
 	];
 
 	private static $instance;
@@ -632,4 +637,8 @@ class Config {
 
 		return $rv;
 	}
+
+	static function get_user_agent() {
+		return sprintf(self::get(self::HTTP_USER_AGENT), self::get_version());
+	}
 }
diff --git a/classes/urlhelper.php b/classes/urlhelper.php
index 710b32b00f1be98899187be954f83fc54b1852e0..0e4834b72189f031d85ea9d23971bca247e7151f 100644
--- a/classes/urlhelper.php
+++ b/classes/urlhelper.php
@@ -281,8 +281,7 @@ class UrlHelper {
 			curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
 			curl_setopt($ch, CURLOPT_HEADER, true);
 			curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
-			curl_setopt($ch, CURLOPT_USERAGENT, $useragent ? $useragent :
-				SELF_USER_AGENT);
+			curl_setopt($ch, CURLOPT_USERAGENT, $useragent ? $useragent : Config::get_user_agent());
 			curl_setopt($ch, CURLOPT_ENCODING, "");
 
 			if  ($http_referrer)
diff --git a/include/functions.php b/include/functions.php
index 922d3765c6e726e21564f530705d021b6642c663..36519fd4452aeab315c9ebb395aa2c23d9e517fd 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -157,8 +157,7 @@
 	require_once 'controls.php';
 	require_once 'controls_compat.php';
 
-	define('SELF_USER_AGENT', 'Tiny Tiny RSS/' . Config::get_version() . ' (http://tt-rss.org/)');
-	ini_set('user_agent', SELF_USER_AGENT);
+	ini_set('user_agent', Config::get_user_agent());
 
 	/* compat shims */
 
diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php
index 3b4094b1b86ff2697c9213afa9c5f75dabe66e2e..732067557c58fdd59367758de2e86925184ab6d5 100755
--- a/plugins/af_redditimgur/init.php
+++ b/plugins/af_redditimgur/init.php
@@ -785,7 +785,8 @@ class Af_RedditImgur extends Plugin {
 
 	}
 
-	private function get_header($url, $header, $useragent = SELF_USER_AGENT) {
+	/** $useragent defaults to Config::get_user_agent() */
+	private function get_header($url, $header, $useragent = false) {
 		$ret = false;
 
 		if (function_exists("curl_init")) {
@@ -795,7 +796,7 @@ class Af_RedditImgur extends Plugin {
 			curl_setopt($ch, CURLOPT_HEADER, true);
 			curl_setopt($ch, CURLOPT_NOBODY, true);
 			curl_setopt($ch, CURLOPT_FOLLOWLOCATION, !ini_get("open_basedir"));
-			curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
+			curl_setopt($ch, CURLOPT_USERAGENT, $useragent ? $useragent : Config::get_user_agent());
 
 			@curl_exec($ch);
 			$ret = curl_getinfo($ch, $header);
@@ -804,11 +805,11 @@ class Af_RedditImgur extends Plugin {
 		return $ret;
 	}
 
-	private function get_content_type($url, $useragent = SELF_USER_AGENT) {
+	private function get_content_type($url, $useragent = false) {
 		return $this->get_header($url, CURLINFO_CONTENT_TYPE, $useragent);
 	}
 
-	private function get_location($url, $useragent = SELF_USER_AGENT) {
+	private function get_location($url, $useragent = false) {
 		return $this->get_header($url, CURLINFO_EFFECTIVE_URL, $useragent);
 	}