How to Add an Anchor Link to your Squarespace Website

If you have a one-page website that continuously scrolls down the homepage, you’ll probably need to use something called Anchor Links or Jump Links.

You’ve likely used an anchor link on recipes you’ve found online. They’re usually close to the top of the page, and let you jump all the way down the page where the recipe is actually located—after all the flowery text from the author that helps boost their recipe on Google’s search engines.

Follow this guide to edit or create your own anchor links on your Squarespace website.

  1. Add a code block to the section you want to jump to

Go to your Squarespace website dashboard and click Edit.

Select the page you’d like to add the anchor link to, and scroll to the section where you want to add it.

Hover over the lefthand side of the section until a button appears that says Add Block.

Click on Code to add a code block.

Drag the code block to the position you’d like the anchor to jump to.

2. Add the anchor code

Hover over the code block you’ve just added to your section. Click on the Pencil icon to edit the code.

Add in the following code:

<div id="book"></div>

My anchor ID is book.

You can name your anchor ID anything you’d like. Just replace book in the above code with your unique anchor ID.

In the example below, I’ve changed the anchor ID to worm:

<div id="worm"></div>

HOT TIP

  • TEXT CASE

    • book and Book are not the same. Use the exact text case from your anchor ID in the next step.

3. Create your link (top navigation)

To add this anchor link to the top navigation of your site, click on the + icon near Main Navigation and select Link.

Edit the Link Title to what you want this top navigation link to be.

Edit the Link to be:

/yourpage#youranchor

/yourpage is the exact URL slug for the page you’ve created the anchor on.

#youranchor is the exact anchor ID you created in the previous step.

In my example, the link would be:

/home#book

If your anchor ID was worm and you created the anchor ID on your /home page, the link would be:

/home#worm

HOW TO FIND THE URL SLUG FOR YOUR PAGE

Go to your website dashboard and hover to the right of the page name until a gear icon appears. You can see it in the screenshot below:

Click into the gear icon and copy the URL SLUG.

4. Create your link (in-text hyperlink)

Click into a text box and highlight the words you want to add the link to.

Add the anchor link here, and hit Apply.

/yourpage#youranchor

In my example, I’ve used:

/home#book