1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[Shopify] GoogleにIndexされないページを追加する

Posted at

このページは検索エンジンにIndexされたくない。というときはこちらの方法を参照してください。

no-indexテンプレートの作成

「管理ページ」→「テーマのカスタマイズ」→「コードの編集」

Templates配下にて、「新しいTemplateを追加する」

image.png

ここで、名前を指定して「テンプレートを作成する」をクリック。

ここでテンプレートを編集する必要はありません。

theme.liquid を編集

次に theme.liquid を編集します。

image.png

イメージのように<head></head>内に下記のコードを挿入してください。


  {% if template contains 'no-index' %}
    <meta name="robots" content="noindex">
  {% endif %}

 テンプレートの適用

対象のページのテンプレートを選択します。

image.png

確認

ページのソースコードを確認します。

image.png

以上です。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?