Jump to content

DaoEthicalGifts

Member
  • Posts

    4
  • Joined

  • Last visited

Posts posted by DaoEthicalGifts

  1. Site URL: https://daoethicalgifts.com/search

    I recently included site search for our website. Apparently, Squarespace sets this type of page to "no index" per default by putting a block in the robots.txt. (Link to description in Squarespace help section)

    Now, Google Search Console tells me that this is the wrong way to do it:

    "If you do want to block this page from Google Search, robots.txt is not the correct mechanism to avoid being indexed. To avoid being indexed, remove the robots.txt block and use 'noindex'"

    I am worried about the Squarespace default settings having a negative impact on our ranking. (How) can I manually change the settings? Or is this nothing to worry about?

    Any recommendations or experience values are much appreciated!

  2. If anyone is interested in getting this to work on the Galapagos template (and any other template if adjustments are made):

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script>
      /* The code here replaces the search link in the navigation bar (which is required) */
      /* with the search block which was placed initially in the footer (also required) */
      $(".nav-container > ul.nav-list > li:nth-last-child(1) a").replaceWith($(".search-block"));
    </script>

    This should be injected at Settings > Advanced > Code Injection > Footer (it needs to run after the Search Block you placed in the footer has been created or else it will not work).

    If you use another template that doesn't allow search blocks in the header, this should still work, you simply need to inspect the code on your actual webpage (right click > inspect) and search for the class naming conventions your template uses for its <nav> tag and make the necessary changes to the code above.  The Galapagos class naming for the navigation bar is .nav-container which has an unordered list (ul) with class name of nav-list which contains list items (li) so you would change those names (add/remove if needed) accordingly to what you find.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.