How can I prevent Google from indexing the pages inside my Webflow subdomain and instead only index the pages inside the /blog subfolder? Is there an easier way to generate sitemaps for the subfolder instead of manually copying and pasting from a sitemap generator?

Published on
September 22, 2023

To prevent Google from indexing pages inside your Webflow subdomain and only index pages inside the /blog subfolder, follow these steps:

  1. Add a robots.txt file: In order to communicate with search engines about your website's crawling and indexing preferences, you need to create a robots.txt file.
  • In your Webflow project, go to the Project Settings by clicking on the gear icon in the left sidebar.
  • Open the SEO tab, and scroll down to find the "Robots.txt" section.
  • Click on "Add Your Own" and enter the following code:
    ```
    User-agent: *
    Disallow: /
    Allow: /blog/
    ```
  • Save the changes and publish your site.
  1. Configure your subdomain: If you are using a subdomain for your Webflow blog (e.g., blog.example.com), you can configure it to have a different robots.txt file than the main domain.
  • Access your DNS provider's settings and add a new "A" record for the subdomain pointing to Webflow's IP address.
  • In your Webflow project settings, go to the Custom Domains tab and add the subdomain (e.g., blog.example.com) as a custom domain.
  • Publish your site and wait for the DNS changes to propagate.
  1. Generate a sitemap for the subfolder: To create a sitemap specifically for the /blog subfolder, you can use Webflow's built-in sitemap feature.
  • In the Webflow Designer, go to the Pages panel and select the "Blog" folder.
  • Open the Settings tab and scroll down to the "Sitemap" section.
  • Enable the "Include in XML sitemap" option.
  • Publish your site to generate the updated sitemap with only the blog pages.

By following these steps, you can instruct Google to exclude pages within your subdomain while allowing them to index only the pages within the /blog subfolder. Additionally, Webflow's sitemap feature makes it easy to generate a sitemap specifically for the subfolder, eliminating the need for manual copying and pasting from a separate sitemap generator.

Additional Questions:

  1. How do I exclude specific pages within the /blog subfolder from being indexed by Google?
  2. Can I generate a sitemap for multiple subfolders in Webflow?
  3. Are there any SEO best practices to follow when using Webflow for my website?