diff --git a/beanbag_docutils/sphinx/ext/github.py b/beanbag_docutils/sphinx/ext/github.py
index 81d3b23f820c283ec72628c9a9aa73a93169b7a8..b04b59dfb29dd00892b1158399620399031f169e 100644
--- a/beanbag_docutils/sphinx/ext/github.py
+++ b/beanbag_docutils/sphinx/ext/github.py
@@ -281,7 +281,8 @@ def _find_ast_node_for_path(module, path):
 
 
 def github_linkcode_resolve(domain, info, github_org_id, github_repo_id,
-                            branch, source_prefix='', allowed_module_names=[]):
+                            branch, source_prefix='', allowed_module_names=[],
+                            *, github_url='https://github.com'):
     """Return a link to the source on GitHub for the given autodoc info.
 
     This takes some basic information on the GitHub project, branch, and
@@ -289,6 +290,10 @@ def github_linkcode_resolve(domain, info, github_org_id, github_repo_id,
     approprite line on the GitHub repository browser for the class, function,
     variable, or other object.
 
+    Version Changed:
+        2.1:
+        Added ``github_host`` and ``github_scheme`` arguments.
+
     Args:
         domain (unicode):
             The autodoc domain being processed. This only accepts "py", and
@@ -317,6 +322,17 @@ def github_linkcode_resolve(domain, info, github_org_id, github_repo_id,
             The list of top-level module names considered valid for links.
             If provided, links will only be generated if residing somewhere
             in one of the provided module names.
+
+        github_url (str, optional):
+            The URL to the base of the GitHub server.
+
+            Version Added:
+                2.1
+
+    Returns:
+        str:
+        The link to the source. This will be ``None`` if a URL couldn't be
+        calculated.
     """
     module_name = info['module']
 
@@ -354,9 +370,12 @@ def github_linkcode_resolve(domain, info, github_org_id, github_repo_id,
 
     assert isinstance(ref, six.text_type)
 
-    return ('https://github.com/%s/%s/blob/%s/%s%s%s'
-            % (github_org_id, github_repo_id, ref, source_prefix,
-               filename, linespec))
+    github_url = github_url.rstrip('/')
+
+    return (
+        f'{github_url}/{github_org_id}/{github_repo_id}/blob/'
+        f'{ref}/{source_prefix}{filename}{linespec}'
+    )
 
 
 def clear_github_linkcode_caches():
diff --git a/beanbag_docutils/sphinx/ext/tests/test_github.py b/beanbag_docutils/sphinx/ext/tests/test_github.py
index 1195ebc7443a0aa4fcb15189c1d0f3aaaefc0108..16087686442ee37138974b57f648f9db9a9c0c20 100644
--- a/beanbag_docutils/sphinx/ext/tests/test_github.py
+++ b/beanbag_docutils/sphinx/ext/tests/test_github.py
@@ -425,6 +425,104 @@ class GitHubLinkCodeResolveTests(kgb.SpyAgency, SphinxExtTestCase):
 
         self.assertSpyCallCount(_run_git, 4)
 
+    def test_with_github_url(self):
+        """Testing github_linkcode_resolve with custom github_url="""
+        self.spy_on(_run_git, op=kgb.SpyOpMatchInOrder([
+            {
+                'args': (['fetch', 'origin', 'mybranch', 'origin'],),
+                'call_original': False,
+            },
+            {
+                'args': (['branch', '-rv', '--contains', 'mybranch'],),
+                'op': kgb.SpyOpReturn(
+                    b'  origin/mybranch abcd123 Here is a commit.\n'
+                ),
+            },
+            {
+                'args': (['log', '--pretty=format:%H', '...abcd123'],),
+                'op': kgb.SpyOpReturn(
+                    b'157ac365d792c79987966e0152d16d6d1526b24d\n'
+                ),
+            },
+            {
+                'args': (['rev-parse', 'mybranch'],),
+                'op': kgb.SpyOpReturn(
+                    b'55ca6286e3e4f4fba5d0448333fa99fc5a404a73\n'
+                ),
+            },
+        ]))
+
+        url = github_linkcode_resolve(
+            domain='py',
+            info={
+                'module': self.SRC_MODULE,
+                'fullname': 'ClassB',
+            },
+            github_org_id='beanbaginc',
+            github_repo_id='beanbag_docutils',
+            branch='mybranch',
+            github_url='https://dev.example.com/github')
+
+        self.assertIsNotNone(url)
+        self.assertIsInstance(url, six.text_type)
+        self.assertEqual(
+            url,
+            'https://dev.example.com/github/beanbaginc/beanbag_docutils/blob/'
+            '55ca6286e3e4f4fba5d0448333fa99fc5a404a73/beanbag_docutils/'
+            'sphinx/ext/tests/testdata/github_linkcode_module.py#L9')
+
+        self.assertSpyCallCount(_run_git, 4)
+
+    def test_with_github_url_trailing_slash(self):
+        """Testing github_linkcode_resolve with custom github_url= with
+        trailing slash
+        """
+        self.spy_on(_run_git, op=kgb.SpyOpMatchInOrder([
+            {
+                'args': (['fetch', 'origin', 'mybranch', 'origin'],),
+                'call_original': False,
+            },
+            {
+                'args': (['branch', '-rv', '--contains', 'mybranch'],),
+                'op': kgb.SpyOpReturn(
+                    b'  origin/mybranch abcd123 Here is a commit.\n'
+                ),
+            },
+            {
+                'args': (['log', '--pretty=format:%H', '...abcd123'],),
+                'op': kgb.SpyOpReturn(
+                    b'157ac365d792c79987966e0152d16d6d1526b24d\n'
+                ),
+            },
+            {
+                'args': (['rev-parse', 'mybranch'],),
+                'op': kgb.SpyOpReturn(
+                    b'55ca6286e3e4f4fba5d0448333fa99fc5a404a73\n'
+                ),
+            },
+        ]))
+
+        url = github_linkcode_resolve(
+            domain='py',
+            info={
+                'module': self.SRC_MODULE,
+                'fullname': 'ClassB',
+            },
+            github_org_id='beanbaginc',
+            github_repo_id='beanbag_docutils',
+            branch='mybranch',
+            github_url='https://dev.example.com/github/')
+
+        self.assertIsNotNone(url)
+        self.assertIsInstance(url, six.text_type)
+        self.assertEqual(
+            url,
+            'https://dev.example.com/github/beanbaginc/beanbag_docutils/blob/'
+            '55ca6286e3e4f4fba5d0448333fa99fc5a404a73/beanbag_docutils/'
+            'sphinx/ext/tests/testdata/github_linkcode_module.py#L9')
+
+        self.assertSpyCallCount(_run_git, 4)
+
     def test_with_multiple_refs(self):
         """Testing github_linkcode_resolve with multiple refs for branch"""
         self.spy_on(_run_git, op=kgb.SpyOpMatchInOrder([
