How to unpublish a page from search engines

In this article, we're going to learn how to hide a page from search engines (Google search, Bing, and so on) after the campaign is complete.

Currently, unpublishing pages support and removing it from the page’s listing are not available. However, here’s what you can do to minimize the pages' exposure to visitors.

Method 1:  Remove your page while keeping a backup in the Library

You can completely delete your page from your site while still holding a backup in the Library:


Step 1: From the GemPages Dashboard, open your preferred template to access the Editor.


Step 2: Click on the three-dot button in the top right corner of the Editor. Select Save Template to Library.



Step 3: Input the backup file's name and click Save.



Step 4: Come back to your GemPages Dashboard. Click on the three-dot button on the right side of the page that should be deleted. Hit the “Delete” option. 


 Type “confirm” and select “Delete” then.


Method 2:  Hide the current by adding custom code

Step 1: Go to your Shopify Admin > Online Store > Themes.

Step 2: Select the theme you want to edit, and then click Actions > Edit code.




Step 3: After that, look for the file “theme.liquid” under the Layout section or via the search bar. Select to open the file.



In case you turned off the Header and Footer for your page, please locate the file named "theme.gem-layout-none.liquid" instead.

Step 4: To exclude the Search template, paste the following code in the <head> section:


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


Step 5: To exclude a specific page from the search engine, paste the following code in the <head> section:

{% if handle contains 'page-handle-you-want-to-exclude' %}
<meta name="robots" content="noindex">
<meta name="googlebot" content="noindex">
{% endif %}


Make sure that you replace the page-handle-you-want-to-exclude with the correct page handle. Check out the article about page handle for more information

Step 6: Click on "Save" when finished.


That's all! If you have any difficulty taking these actions, please let us know directly via email & live chat to have them answered!

Was this helpful?