0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 03:31:04 +01:00

added docs about hostnames

This commit is contained in:
Josh Barr 2015-09-27 01:41:52 +12:00
parent 97eaa045fd
commit 221a3e5254

View File

@ -36,6 +36,33 @@ Then, in ``urls.py``, you need to add a link to the ``wagtail.contrib.wagtailsit
You should now be able to browse to ``/sitemap.xml`` and see the sitemap working. By default, all published pages in your website will be added to the site map.
Setting the hostname
~~~~~~~~~~~~~~~~~~~~
By default, the sitemap uses the hostname defined in the Wagtail Admin's ``Sites`` area. If your
default site is called ``localhost``, then URLs in the sitemap will look like:
.. code-block:: xml
<url>
<loc>http://localhost/about/</loc>
<lastmod>2015-09-26</lastmod>
</url>
For tools like Google Search Tools to properly index your site, you need to set a valid, crawlable hostname. If you change the site's hostname from ``localhost`` to ``mysite.com``, ``sitemap.xml``
will contain the correct URLs:
.. code-block:: xml
<url>
<loc>http://mysite.com/about/</loc>
<lastmod>2015-09-26</lastmod>
</url>
Find out more about `working with Sites
</reference/pages/model_reference.html?highlight=site#site>`.
Customising
~~~~~~~~~~~