diff --git a/django/contrib/sitemaps/__init__.py b/django/contrib/sitemaps/__init__.py
index f877317..c2fe3b2 100644
--- a/django/contrib/sitemaps/__init__.py
+++ b/django/contrib/sitemaps/__init__.py
@@ -27,10 +27,11 @@ def ping_google(sitemap_url=None, ping_url=PING_URL):
     if sitemap_url is None:
         raise SitemapNotFound("You didn't provide a sitemap_url, and the sitemap URL couldn't be auto-detected.")
 
-    from django.contrib.sites.models import Site
-    current_site = Site.objects.get_current()
-    url = "http://%s%s" % (current_site.domain, sitemap_url)
-    params = urllib.urlencode({'sitemap':url})
+    if '://' not in sitemap_url:
+        from django.contrib.sites.models import Site
+        current_site = Site.objects.get_current()
+        sitemap_url = "http://%s%s" % (current_site.domain, sitemap_url)
+    params = urllib.urlencode({'sitemap': sitemap_url})
     urllib.urlopen("%s?%s" % (ping_url, params))
 
 class Sitemap(object):
@@ -60,11 +61,10 @@ class Sitemap(object):
     paginator = property(_get_paginator)
 
     def get_urls(self, page=1):
-        from django.contrib.sites.models import Site
-        current_site = Site.objects.get_current()
         urls = []
         for item in self.paginator.page(page).object_list:
-            loc = "http://%s%s" % (current_site.domain, self.__get('location', item))
+            loc = "http://%s%s" % (self.get_domain(),
+                                   self.__get('location', item))
             url_info = {
                 'location':   loc,
                 'lastmod':    self.__get('lastmod', item, None),
@@ -74,6 +74,14 @@ class Sitemap(object):
             urls.append(url_info)
         return urls
 
+    def get_domain(self):
+        """
+        This method can be overridden to avoid the requirement of the ``sites``
+        contrib application.
+        """
+        from django.contrib.sites.models import Site
+        return Site.objects.get_current().domain
+
 class FlatPageSitemap(Sitemap):
     def items(self):
         from django.contrib.sites.models import Site
diff --git a/docs/ref/contrib/sitemaps.txt b/docs/ref/contrib/sitemaps.txt
index a71f19d..eb3ed4a 100644
--- a/docs/ref/contrib/sitemaps.txt
+++ b/docs/ref/contrib/sitemaps.txt
@@ -208,6 +208,24 @@ Sitemap class reference
         page is ``0.5``. See the `sitemaps.org documentation`_ for more.
 
         .. _sitemaps.org documentation: http://www.sitemaps.org/protocol.html#prioritydef
+    
+    .. method:: Sitemap.get_domain
+
+        **Optional.** A method.
+
+        It should return the applicable domain, as a string, to be applied to
+        all URLs within the sitemap.
+
+        By default, this uses the ``sites`` framework and returns the domain
+        from the current :class:`django.contrib.sites.models.Site`.
+        
+        If you don't want use the ``sites`` framework, you can override this
+        method and return the domain of your choosing. This should not include
+        the protocol or path. Examples:
+
+            * Good: :file:`'example.com'`
+            * Bad: :file:`'example/'`
+            * Bad: :file:`'http://example.com'`
 
 Shortcuts
 =========
diff --git a/tests/regressiontests/sitemaps/__init__.py b/tests/regressiontests/sitemaps/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/regressiontests/sitemaps/fixtures/sitemapdata.json b/tests/regressiontests/sitemaps/fixtures/sitemapdata.json
new file mode 100644
index 0000000..d6d5ae0
--- /dev/null
+++ b/tests/regressiontests/sitemaps/fixtures/sitemapdata.json
@@ -0,0 +1,34 @@
+[
+  {
+    "model": "sitemaps.entry",
+    "pk": 1,
+    "fields": {
+      "title": "My first entry",
+      "date": "2008-01-01 12:30:00"
+    }
+  },
+  {
+    "model": "sitemaps.entry",
+    "pk": 2,
+    "fields": {
+      "title": "My second entry",
+      "date": "2008-01-02 12:30:00"
+    }
+  },
+  {
+    "model": "sitemaps.entry",
+    "pk": 3,
+    "fields": {
+      "title": "My third entry",
+      "date": "2008-01-02 13:30:00"
+    }
+  },
+  {
+    "model": "sitemaps.entry",
+    "pk": 4,
+    "fields": {
+      "title": "A & B < C > D",
+      "date": "2008-01-03 13:30:00"
+    }
+  }
+]
diff --git a/tests/regressiontests/sitemaps/models.py b/tests/regressiontests/sitemaps/models.py
new file mode 100644
index 0000000..14f5c3d
--- /dev/null
+++ b/tests/regressiontests/sitemaps/models.py
@@ -0,0 +1,14 @@
+from django.db import models
+
+class Entry(models.Model):
+    title = models.CharField(max_length=200)
+    date = models.DateTimeField()
+
+    class Meta:
+        ordering = ('date',)
+
+    def __unicode__(self):
+        return self.title
+
+    def get_absolute_url(self):
+        return "/blog/%s/" % self.pk
diff --git a/tests/regressiontests/sitemaps/tests.py b/tests/regressiontests/sitemaps/tests.py
new file mode 100644
index 0000000..17eee42
--- /dev/null
+++ b/tests/regressiontests/sitemaps/tests.py
@@ -0,0 +1,33 @@
+from xml.dom import minidom
+from django.test import TestCase
+
+
+class SitemapsTestCase(TestCase):
+    fixtures = ['sitemapdata.json']
+    urls = 'regressiontests.sitemaps.urls'
+    
+    def test_standard_and_custom(self):
+        resp = self.client.get('/sitemap.xml')
+        self.assertEqual(resp.status_code, 200)
+        sitemap_xml = resp.content
+        
+        doc = minidom.parseString(sitemap_xml)
+        urls = doc.getElementsByTagName('url')
+        self.assertEqual(8, len(urls))
+        
+        found_urls = []
+        
+        for url in urls:
+            loc = url.firstChild.firstChild
+            found_urls.append(loc.wholeText)
+        
+        self.assertEqual([
+            u'http://djangoproject.com/blog/1/',
+            u'http://djangoproject.com/blog/2/',
+            u'http://djangoproject.com/blog/3/',
+            u'http://djangoproject.com/blog/4/',
+            u'http://example.com/blog/1/',
+            u'http://example.com/blog/2/',
+            u'http://example.com/blog/3/',
+            u'http://example.com/blog/4/'
+        ], sorted(found_urls))
diff --git a/tests/regressiontests/sitemaps/urls.py b/tests/regressiontests/sitemaps/urls.py
new file mode 100644
index 0000000..cd3f496
--- /dev/null
+++ b/tests/regressiontests/sitemaps/urls.py
@@ -0,0 +1,20 @@
+from django.conf.urls.defaults import *
+from django.contrib.sitemaps import Sitemap
+from regressiontests.sitemaps.models import Entry
+
+class EntrySitemap(Sitemap):
+    def items(self):
+        return Entry.objects.all().order_by('-date')
+
+class CustomDomainSite(EntrySitemap):
+    def get_domain(self):
+        return 'djangoproject.com'
+
+sitemaps = {
+    'standard': EntrySitemap,
+    'custom': CustomDomainSite,
+}
+
+urlpatterns = patterns('',
+    (r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps})
+)
diff --git a/tests/runtests.py b/tests/runtests.py
index 81b4424..24d3a4f 100755
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -25,6 +25,7 @@ ALWAYS_INSTALLED_APPS = [
     'django.contrib.contenttypes',
     'django.contrib.auth',
     'django.contrib.sites',
+    'django.contrib.sitemaps',
     'django.contrib.flatpages',
     'django.contrib.redirects',
     'django.contrib.sessions',
diff --git a/tests/urls.py b/tests/urls.py
index 01d6408..893836a 100644
--- a/tests/urls.py
+++ b/tests/urls.py
@@ -29,7 +29,7 @@ urlpatterns = patterns('',
     (r'widget_admin/', include('regressiontests.admin_widgets.urls')),
 
     (r'^utils/', include('regressiontests.utils.urls')),
-
+    
     # test urlconf for syndication tests
     (r'^syndication/', include('regressiontests.syndication.urls')),
 
