Skip to content

(DOCSP-29016): Added SEO guidelines. #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions snooty.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ db-example = "+db+"
[substitutions]
mdbsg = "MongoDB Style Guide"
service = "Atlas"
html = ":abbr:`HTML (Hypertext Markup Language)`"
2 changes: 1 addition & 1 deletion source/includes/steps-install-aws-keys.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ content: |

* - Machine Username
- Type the username you want to use to login to AWS servers
via SSH.
with SSH.

* - MongoDB Data Directory
- Set the path to the MongoDB databases that Cloud creates.
Expand Down
5 changes: 5 additions & 0 deletions source/style-guide.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ MongoDB external and internal customers.
MongoDB products. You can use these basic guidelines,
however, when writing release notes for any product or service.

:doc:`/style-guide/seo-guidelines`
Provides guidance for optimizing your documentation pages for
search.

:github:`User Interface Guidelines </mongodb/leafygreen-ui>`
Provides specifications for the user interface of MongoDB web and
desktop applications. The components can be viewed
Expand All @@ -54,6 +58,7 @@ MongoDB external and internal customers.
/style-guide/screenshots/index
/style-guide/error-message-guidelines
/style-guide/release-notes-guidelines
/style-guide/seo-guidelines
/style-guide/revision-history

The |mdbsg| includes material from the following:
Expand Down
15 changes: 12 additions & 3 deletions source/style-guide/markup/directives/metadata.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
.. _metadata:

========================
Page Metadata Directives
========================

meta
----

Generates HTML ``<meta>`` tags.
Use ``.. meta::`` to add |html| meta tags to a page. Adding meta tags
aids in searches both internally and through the Internet. You can add
both keywords and descriptions. To learn more, see
:ref:`seo-guidelines`.

.. code-block:: rst

.. meta::
:keywords: read concern, local read concern, read isolation, transactions, multi-document transactions
:description: You can tune the consistency and availability of your application using write concerns and read concerns.

.. meta::
Add the ``.. meta::`` directive on the line below the
page title with a line break in between.

Learn more about the ``meta`` directive from the
`{+docutils+} documentation <http://docutils.sourceforge.net/docs/ref/rst/directives.html#meta>`__.


title
-----

Expand Down
103 changes: 103 additions & 0 deletions source/style-guide/seo-guidelines.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
.. _seo-guidelines:

=====================================
Search Engine Optimization Guidelines
=====================================

Search Engine Optimization (SEO) considers the actual terms that users
enter into search engines (keywords) and employs best practices to
improve traffic to web pages from search engines. The following
guidance should help you optimize your documentation pages for search.

Titles
------

Use the following SEO best practices for page and subsection titles:

- Use a maximum of 70 characters.

- Include target keywords (the actual terms that users
enter into search engines to reach your page).

- Avoid excessive or irrelevant words (keyword stuffing).

- Strive for unique page titles. Identical titles, even between
documentation sets, might compete in search results.

To learn more, see :ref:`titles-and-headings`.

Alternative Text
----------------

Screen readers read alternative text for images aloud so that users can
better understand an image. Specify alternative text according to the
following SEO best practices:

- Use a maximum of 125 characters per image.

- Describe the image with sufficient detail to understand what it shows.

- If they apply to the image, include keywords
(the actual terms that users enter into search engines).

To learn more, see :ref:`write-for-accessibility`.

Keywords
--------

You can add the actual terms that users enter into search engines
(keywords) to your page to improve its SEO. Add keywords according to
the following best practices:
Comment on lines +48 to +50
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:

I think it might be better to suggest that keywords may not help SEO nor be used to match up with search terms, at least with Google. See
https://developers.google.com/search/docs/crawling-indexing/special-tags#unsupported
for more info.

Copy link
Contributor Author

@corryroot corryroot Apr 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there are two parts to these recommendations. We should use the language that users search for in our content. But, search engines might not account for the keyword tags that we use.


- Take the most concise form of the information that the page conveys
and make that the target keyword.
Comment on lines +52 to +53
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion, non-blocking]

Would it be possible to include an example of this practice? For instance, I would find it helpful if we provided a link to some docs page and highlighted what the target keyword would be for that page.


.. example::

The target keyword for the `Getting Started with MongoDB Atlas
<https://learn.mongodb.com/courses/getting-started-with-mongodb-atlas>`_ University page is
``mongodb atlas course``.

- Don't add keywords so broad that they compete with the product page.

- Don't add keywords so specific that we miss the actual behavior of
our searchers. For example, add “mongodb atlas course” instead of
“Getting Started with Atlas Data Platform”.

While keyword tags are available, some search engines might ignore
these tags. To learn more, see :ref:`metadata`.

Descriptions
------------

The description is a snippet that appears under the link in the search
results, which can impact SEO. Write these descriptions according to
the following best practices:

- Use a concise description of the page content that is enticing, if
possible.

- Emphasize the “why” for using the page.

- Use a maximum of 155 characters.

- Include target keywords and a call to action (CTA) that prompts the
user to complete their desired task.

.. example::

The following examples use a CTA in the description meta tag:

.. code-block:: rst

.. meta::
:description: Use a language analyzer to create search keywords in your Atlas Search index that are optimized for a particular natural language.

.. code-block:: rst

.. meta::
:description: Use the character filters in an Atlas Search custom analyzer to examine text one character at a time and perform filtering operations.

- Use unique descriptions for every page.

To learn more, see :ref:`metadata`.