You can prevent search engines from indexing selected pages by specifying the noindex metadata for the pages or overwriting MyCashflow's default robots.txt file.

If you'd like to prevent a small number of pages from being indexed, specifying the noindex metadata is the most efficient option. A good example of the use of the noindex metadata is a content page used as a thank you page for the contact form.

A higher number of pages is more easily excluded from indexing by using the robots.txt file.

Defining the noindex metadata for selected pages

Adding the noindex metadata requires modifying the store theme's HTML files. If you don't have any experience in editing HTML files, contact your theme's designer or our customer service.

Adding the noindex metadata for a page involves the following:

  • Creating an alternative template for the theme

    To be able to use alternative templates, you'll need the Web Designer extension.

  • Adding the noindex metadata to the template's <head> element

You can add the noindex metadata to any of your online store's contents. The following instructions use a content page as an example:

  1. Create a copy of the content page template.

    The template to be copied can be found in the infopage.html file located in the theme's root directory.

    If your store theme doesn't include a content page template, you can copy the template.html file.

  2. Paste the copy to the theme's content page template folder /infopage

    Save the file under the name noindex.html, for instance.

  3. Add the noindex command's markup to the <head> element.

    Make sure that the <head> element is located in the template file, not in a separate helper file (see the example below).

    The noindex markup is in bold in the example below:

    {Doctype}
    <html>
      <head>
        <meta charset="utf-8" />
        <title>{Title}</title>
        <meta name="description" content="{MetaDescription}" />
        <meta name="robots" content="noindex, follow"/>
        {Feed}
        <link rel="canonical" href="{ShopUrl}{CanonicalUrl}" />
        <link rel="shortcut icon" type="image/ico" href="{ThemeUrl}/images/favicon.ico" />
        {Helper(file: 'helpers/styles')}
        {Extensions(for: 'head')}
      </head>
      <body>
        <div class="SiteContent">
          <div class="Container">
            <div class="Grid">
              <div class="Col-3-12 Col-Tablet-12-12">
                <h3>{%AboutUs}</h3>
                {InfoNavigation(
                  before: '<div class="SideNavigation">',
                  after: '</div>'
                )}
              </div>
              <div class="Col-9-12 Col-Tablet-12-12">
                <h2>{PageTitle}</h2>
                {Content}
              </div>
            </div>
          </div>
        </div>
        {Helper(file: 'helpers/footer')}
      </body>
    </html>
  4. Enable the template for the selected pages.

    The template can be enabled via the admin panel, in the content page form's Template file section.

Next time search engines index your website, the noindex command is going to indicate that the page shouldn't be included in search engine results.

If you'd like to index the page in some versions, add corresponding templates to the versions' store themes, and make the following change to the noindex meta tag:

<meta name="robots" content="index, follow" />

Overwriting the robots.txt file

If you'd like to prevent a substantial number of pages from being indexed by search engines, the easiest way to do it is by editing the robots.txt file.

The text file robots.txt is read by search engines indexing websites for the sake of search results. The file specifies information and restrictions for bots regarding site indexing.

All of MyCashflow online stores are equipped with a default robots.txt file, which can be found at https://www.storeaddress.fi/robots.txt

Google does not recommend using the robots.txt file for preventing indexing.

If a page excluded from indexing in the robots.txt file contains links to other online store pages, the page may be indexed nevertheless.

Here's how to overwrite the default MyCashflow robots.txt file:

  1. Prepare the robots.txt file in a text editor.

    The example below is MyCashflow's default robots.txt, with four new disallow commands added.

    # Replace the sitemap URL with the address of your own online store
    Sitemap: http://www.example.com/sitemap.xml
    User-agent: *
    Allow: /
    Allow: /templates/css/
    Allow: /templates/js/
    Allow: /templates/i/
    Disallow: /flow/
    Disallow: /interface/
    Disallow: /cart/
    Disallow: /checkout/
    Disallow: /account/
    Disallow: /templates/
    Disallow: /orderstatus/
    Disallow: /search/
    Disallow: /searchproduct/
    Disallow: /page/2
    Disallow: /category/4
    Disallow: /category/5
    Disallow: /product/8

    By default, all addresses under the /interface access point are excluded from search engines by using the X-Robots-Tag: noindex HTTP header.

    The default robots.txt file contains a link to the sitemap.xml file so that search engines index the website by default. You can speed up Google's indexing by adding the file to Search Console (and other similar tools).

  2. Add the file to your online store's root directory.

    You can manage files on the admin panel's User interface > Filebrowser page.

    When necessary, see also the instructions on file management.

The next time search engines index your online store, the settings defined in the robots.txt file will take effect and the pages you've indicated will be excluded from indexing.

If necessary, learn more about using robots.txt files from Google Help.

Version-specific robots.txt files

If you'd like to use different robots.txt in different store versions, create a separate robots-VERSION.txt file for each of these versions and 301 redirects to the files.

In order to create redirects in your online store, you'll need the Redirects extension.

  1. Prepare the version's individual robots.txt file in a text editor.
  2. Add the file to your online store's root directory.

    Save the file under the name robots-VERSION.txt, for instance.

  3. Create a 301 redirect to the file.
    • Source address: https://www.example.com/robots-VERSION.txt

      As the source address, use the version's URL address.

    • Target address: /files/robots-VERSION.txt

The next time search engine robots index different versions of your store, the Redirects extension will redirect them to the version-specific robots.txt files.