Skip to content

Commit 7987832

Browse files
Donapi“Audrey
authored and
“Audrey
committed
[IMP] website: redirects
taskid-3667291 closes #9129 X-original-commit: d2ba715 Signed-off-by: Audrey Vandromme (auva) <[email protected]> Signed-off-by: Donatienne Pirlot (dopi) <[email protected]>
1 parent e7c634b commit 7987832

File tree

1 file changed

+43
-38
lines changed
  • content/applications/websites/website

1 file changed

+43
-38
lines changed

content/applications/websites/website/pages.rst

+43-38
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ Pages
77
Odoo allows you to create pages for your website and customize their content and appearance to your
88
needs.
99

10-
.. note::
11-
*Static* pages are pages that have stable content, such as the homepage. You can manually create
12-
new ones, define their URL, adapt their :ref:`properties <website/page_properties>`, etc.
13-
*Dynamic* pages, on the other hand, are generated dynamically. All pages generated automatically
14-
by Odoo, for example when you install an app or module (e.g., `/shop` or `/blog`) or publish a
15-
new product or blog post, are dynamic pages and are therefore managed differently.
10+
.. _website/page_type:
11+
12+
**Static** pages have stable content, such as the homepage. You can manually create new ones, define
13+
their URLs, adapt their :ref:`properties <website/page_properties>`, etc. **Dynamic** pages, on the
14+
other hand, are generated dynamically. All pages generated automatically by Odoo, for example, when
15+
you install an app or module (e.g., `/shop` or `/blog`) or publish a new product or blog post, are
16+
dynamic pages and are therefore managed differently.
1617

1718
Page creation
1819
=============
@@ -23,7 +24,7 @@ page, proceed as follows:
2324
#. - Either open the **Website** app, click :guilabel:`+ New` in the top-right corner, then select
2425
:guilabel:`Page`;
2526
- Or go to :menuselection:`Website --> Site --> Pages` and click :guilabel:`New`.
26-
#. Enter a :guilabel:`Page Title`; this title is used in the menu, as well as in the page's URL.
27+
#. Enter a :guilabel:`Page Title`; this title is used in the menu and the page's URL.
2728
#. Click :guilabel:`Create`.
2829
#. Customize the page's content and appearance using the website builder, then click
2930
:guilabel:`Save`.
@@ -41,7 +42,7 @@ Publishing/unpublishing pages
4142
-----------------------------
4243

4344
Pages need to be published to make them accessible to website visitors. To publish or unpublish a
44-
page, access it, then toggle the switch in the upper-right corner from :guilabel:`Unpublished`
45+
page, access it and toggle the switch in the upper-right corner from :guilabel:`Unpublished`
4546
to :guilabel:`Published`, or vice versa.
4647

4748
.. image:: pages/un-published_toggle.png
@@ -53,27 +54,28 @@ to :guilabel:`Published`, or vice versa.
5354
- publish/unpublish a page from the :ref:`page properties <website/page_properties>`, where you
5455
can define a publishing date and/or restrict the page's visibility if needed;
5556
- publish/unpublish several pages at once: go to :menuselection:`Website --> Site --> Pages`,
56-
select the pages, then, click :guilabel:`Action` and select :guilabel:`Publish` or
57+
select the pages, then click :guilabel:`Action` and select :guilabel:`Publish` or
5758
:guilabel:`Unpublish`.
5859

5960
Homepage
6061
--------
6162

62-
By default, when you create a website, Odoo creates a dedicated :guilabel:`Home` page, but you can
63+
When you create a website, Odoo creates a dedicated :guilabel:`Home` page by default, but you can
6364
define any website page as your homepage. To do so, go to :menuselection:`Website --> Configuration
6465
--> Settings`, then, in the :guilabel:`Website info` section, define the URL of the desired page in
6566
the field :guilabel:`Homepage URL` (e.g., `/shop`).
6667

67-
Alternatively, you can define any static page as your homepage by going to :menuselection:`Website
68-
--> Site --> Properties`. Select the :guilabel:`Publish` tab and enable :guilabel:`Use as Homepage`.
68+
Alternatively, you can define any :ref:`static page <website/page_type>` as your homepage by going
69+
to :menuselection:`Website --> Site --> Properties`. Select the :guilabel:`Publish` tab and enable
70+
:guilabel:`Use as Homepage`.
6971

7072
.. _website/page_properties:
7173

7274
Page properties
7375
---------------
7476

75-
To modify a static page's properties, access the page you wish to modify, then go to
76-
:menuselection:`Site --> Properties`.
77+
To modify a :ref:`static page's <website/page_type>` properties, access the page you wish to
78+
modify, then go to :menuselection:`Site --> Properties`.
7779

7880
The :guilabel:`Name` tab allows you to:
7981

@@ -134,54 +136,57 @@ To delete a page, proceed as follows:
134136

135137
.. _website/URL-redirection:
136138

137-
URL redirects
138-
-------------
139+
URL redirect mapping
140+
--------------------
139141

140-
Redirecting URLs consists in sending visitors and search engines to a URL that is different from the
141-
one they originally requested. This technique is used, for example, to prevent broken links when you
142-
:ref:`delete a page <website/delete-page>`, :ref:`modify its URL <website/page_properties>`, or move
143-
your site to a new :doc:`domain <configuration/domain_names>`. It can also be used to
144-
improve :doc:`pages/seo`.
142+
URL redirect mapping consists in sending visitors and search engines to a URL different from
143+
the one they initially requested. This technique is used, for example, to prevent broken links when
144+
you :ref:`delete a page <website/delete-page>`, :ref:`modify its URL <website/page_properties>`, or
145+
migrate your site from another platform to an Odoo :doc:`domain <configuration/domain_names>`. It
146+
can also be used to improve :doc:`pages/seo`.
145147

146148
To access existing URL redirections and create new ones, :doc:`activate the developer mode
147149
</applications/general/developer_mode>` and go to :menuselection:`Website --> Configuration -->
148150
Redirects`.
149151

150152
.. note::
151-
- A record is added automatically every time you :ref:`modify a page's URL
153+
- A redirect record is added automatically every time you :ref:`modify a page's URL
152154
<website/page_properties>` and enable :guilabel:`Redirect Old URL`.
153-
- You can set up redirections for static and dynamic pages.
155+
- You can set up redirections for :ref:`static and dynamic pages <website/page_type>`.
154156

155157
To create a new redirection, click the :guilabel:`New` button, then fill in the fields:
156158

157159
- :guilabel:`Name`: Enter a name to identify the redirect.
158160
- :guilabel:`Action`: Select the type of redirection:
159161

160162
- :guilabel:`404 Not found`: visitors are redirected to a 404 error page when they try to access
161-
the page.
162-
- :guilabel:`301 Moved Permanently`: for permanent redirections of static pages; the new URL is
163-
shown in search engine results and the redirect is cached by browsers.
163+
an unpublished or deleted page.
164+
- :guilabel:`301 Moved Permanently`: for permanent redirections of unpublished or deleted
165+
:ref:`static pages <website/page_type>`. The new URL is shown in search engine results, and the
166+
redirect is cached by browsers.
164167
- :guilabel:`302 Moved Temporarily`: for short-term redirections, for example, if you are
165-
redesigning or updating the page. The new URL is neither cached by browsers, nor shown in
166-
search engine results.
167-
- :guilabel:`308 Redirect / Rewrite`: for permanent redirections of dynamic pages; the new URL is
168-
shown in search engine results and the redirect is cached by browsers. Use this redirect type
169-
to rename a dynamic page, for example, if you wish to rename `/shop` into `/market`.
168+
redesigning or updating a page. The new URL is neither cached by browsers nor shown in search
169+
engine results.
170+
- :guilabel:`308 Redirect/Rewrite`: for permanent redirections of existing :ref:`dynamic pages
171+
<website/page_type>`. The URL is renamed; the new name is shown in search engine results and is
172+
cached by browsers. Use this redirect type to rename a dynamic page, for example, if you wish
173+
to rename `/shop` into `/market`.
170174

171175
- :guilabel:`URL from`: Enter the URL to be redirected (e.g., `/about-the-company`) or search for
172-
the desired dynamic page and select it from the list.
173-
- :guilabel:`URL to`: For 301, 302 and 308 redirects, enter the URL to be redirected to. If you want
174-
to redirect to an external URL, make sure to include the protocol (e.g., `https://`).
176+
the desired :ref:`dynamic page <website/page_type>` and select it from the list.
177+
- :guilabel:`URL to`: For 301, 302, and 308 redirects, enter the URL to be redirected to. If you want
178+
to redirect to an external URL, include the protocol (e.g., `https://`).
175179
- :guilabel:`Website`: Select a specific website.
176-
- :guilabel:`Sequence`: to define the order in which redirections are performed, e.g., in the case
180+
- :guilabel:`Sequence`: To define the order in which redirections are performed, e.g., in the case
177181
of redirect chains (i.e., a series of redirects where one URL is redirected to another one, which
178182
is itself further redirected to another URL).
179183

180184
Toggle the :guilabel:`Activate` switch to deactivate the redirection.
181185

182-
.. note::
183-
404, 301 and 302 redirections only work if the original page has been :ref:`unpublished
184-
<website/un-publish-page>` or :ref:`deleted <website/delete-page>`.
186+
.. important::
187+
404, 301, and 302 redirections are meant to migrate traffic from
188+
:ref:`unpublished <website/un-publish-page>` or :ref:`deleted <website/delete-page>` pages
189+
to *new* pages, while the 308 redirect is used for *permanent* redirections of *existing* pages.
185190

186191
.. seealso::
187192
- `Google documentation on redirects and search <https://developers.google.com/search/docs/crawling-indexing/301-redirects>`_

0 commit comments

Comments
 (0)