Optimizing your public website for search is key to connecting with new and returning customers. SharePoint Online includes these search engine optimization (SEO) features to get you started: built-in robots.txt file, auto-generated sitemap file, canonical link filtering, and page-level metatagging for title, keywords, and description.
This article explains the steps in the SEO process:
- Configure SEO settings for the site collection.
- Configure sitemap settings for the site collection.
- Add and edit SEO metatags.
I want to
Understand the sitemap features
SEO features are enabled by default when you provision your public website. As you might expect, they are accessed from the Site Settings page under Site Collection Administration. The features are divided into two groups, SEO settings and sitemap settings.
- Search engine optimization settings Includes two settings for analyzing and refining search results. The first enables you to verify ownership of your website so you can aggregate site statistics using webmaster tools provided by search engines. The second, canonical link filtering, allows for consolidation of related URLs so popularity rankings for a given page can be calculated accurately.
- Search engine sitemap settings Used to edit the robots.txt file to indicate which URLs on your site to exclude from search. Also generates a sitemap file automatically.
Top of Page
Configure SEO settings for the site collection
Some Internet search engines offer webmaster tools that enable you to view crawl activity, upload sitemaps, research keywords, and aggregate search-related site statistics. Before you can access these statistics, however, you must verify with the search engine that you are affiliated with your website and have the authority to review search-related data. The use of webmaster tools also requires a search engine webmaster account.
Verify site ownership
- Sign in to the webmaster tools portal for your desired search engine and provide requested information about your website.
- From your SharePoint Public Website home page, click Settings > Site settings > Site Collection Administration > Search engine optimization settings.
- Click Include these meta tags in pages.
- Copy the meta tag provided by the webmaster tools portal, and paste it into the box.
- Click OK.
- From the webmaster tools portal, ask the search engine to verify your ownership of this website.
Note After verification is complete, you’ll want to leave the meta tag in place because search engines periodically repeat site checks to ensure that ownership data is current.
Canonical URL filtering
Search engines track the number of links pointing to your pages from external sites and use that information to assign popularity rankings in search results. It’s possible for multiple links to point to the same content, but the links will vary based on the parameters they contain. For example, the following two links point to the same page, but when the page is rendered, the content is displayed in either ascending or descending order depending on the parameter appended to the URL:
By default, these links are tracked as two separate items. Because they go to the same page, search rankings would be improved if the links were tracked singularly rather than separately. The canonical URL link parameter filtering feature in SharePoint enables you to do that.
A canonical URL is the URL that search engines use when collecting statistics about links that point to a particular page.
Enabling canonical link parameter filtering means SharePoint will strip all parameters from links unless you specify otherwise when reporting URLs to search engines. In other words, you can explicitly state when parameters should be included with links and what those parameters should be.
Continuing with the example above, let’s say the ascending link received 300 views and the descending link received 500 views. The canonical link parameter filtering feature would strip out everything in the URL from the question mark forward when reporting the link, and search engines would calculate rank based on this portion of the URL: http://www.contoso.com/store-locations. Your content would rank higher in the search results because it would be based on the sum of the views of the two links, which in this case is 800.
Note that some parameters are necessary. For example, if your site features different marketing campaigns on a monthly basis you might want those campaign pages to remain separate in search results. In the following example, the year and month parameters distinguish otherwise identical URLs from one another:
You could specify that the year and month parameters are important and the canonical link parameter filtering feature will strip all parameters from URLs except year and month.
Enable or disable link parameters
- From your SharePoint public site home page, click Settings > Site settings > Site Collection Administration > Search engine optimization settings.
- Do either of the following:
- If you want parameters to be stripped from all links, click Do not filter link parameters.
- If you want certain parameters to be tracked by search engines, click Filter link parameters, and then enter the parameters in the box. Be sure to separate parameters with a semicolon (for example, year;month).
- Click OK.
Top of Page
Configure sitemap settings for the site collection
A sitemap is an XML file or collection of XML files that enable webmasters to inform Internet search engines about new or updated URLs available for crawling. The sitemap is referenced at the bottom of the robots.txt file, a standard text file that resides at the root of your SharePoint site. The two files are complementary in that the sitemap tells search engines what directories and pages to crawl and robots.txt tells search engines what not to crawl. SharePoint generates both files automatically.
SharePoint robots.txt file
The robots.txt is pre-populated with basic information and exposed through the Search Engine Sitemap screen as shown below.
The pre-populated information includes two expressions, which are formatted according to the Robot Exclusion Protocol and explained in the following table.
||“User-agent” refers to search engine robots, which are automated programs that collect information from robot.txt files across the Internet. The asterisk (*) means “any”; thus, the instructions that follow this expression apply to any search engine robot that finds the robots.txt file.
||Tells search engine robots that the /_layouts/ directory and its subdirectories should not be crawled.
||Tells search engine robots that the /_vti_bin/ directory and its subdirectories should not be crawled.
||Tells search engine robots that the /_catalogs/ directory and its subdirectories should not be crawled.
Following this same protocol, you can instruct search engines to ignore other pages and directories on your site. For example, to disallow the /temp/ directory in addition to the directories already specified, you would indicate it this way:
The directories listed on the Search Engine Sitemap page are system directories. Although you can remove them from this excluded content—which removes them from robots.txt—we recommend that you leave them and append any additional directory or page paths below them.
Exclude pages and directories from search
- From your SharePoint public site home page, click Settings > Site settings > Site Collection Administration > Search engine sitemap settings.
- In Internet Search Engine Exclusion, type the URLs or paths that search engines should not crawl. Follow the Robot Exclusion Protocol shown in the example above.
Important If you see red text at the top of the screen that says “The SEO sitemap can’t be generated,” it’s because your website is currently offline. To set it online, click WEBSITE NOW OFFLINE in the upper-right corner of the page. Clicking this will make your site visible to all Internet users
SharePoint sitemap file
The SharePoint sitemap file contains a listing of every page in your site collection that is available for crawling. You can view your sitemap file by browsing to http://[YourSiteURL/sitemap.xml.
Top of Page
Create SEO meta tags
SEO meta tags include title, description, keywords, and several others. They are attached to each page of your website and are accessible from the ribbon. Each SEO meta tag is defined in the table below.
|SEO meta tag
||The page name that appears in the URL. This name may or may not match the friendly page title.
||The friendly page title. This title can be displayed at the top of the page or hidden from view.
||The title that appears at the top of the browser window, browser tabs, and as link text in search results. This is the most important SEO element on a webpage.
||The description that accompanies the browser title in search results. Descriptions should be brief (150 characters) and precise. A well-crafted description not only informs users as to what the page contains but also encourages them to click the link and visit.
||Terms, phrases, and synonyms that describe the content on the page. Include the words your customers use when searching for the kind of content you feature. Use a comma to separate each word.
|Exclude from Internet search engines
||Tells search engine crawlers that the page should not be indexed or included in search results. The search engine will follow any links embedded in the page.
Add and edit SEO meta tags
- Create a new page or edit an existing one.
- On the Page tab, in the Manage group, click Edit Properties > Edit SEO Properties.
- Fill out each of the meta data fields.
- Click Save.
Top of Page
See Public Website help for Office 365.
Top of Page