# Subscribe 404 on homepage

**URL:** <https://forum.ghost.org/t/subscribe-404-on-homepage/31179>\
**Category:** Memberships & subscriptions\
**Created:** [July 6, 2022, 3:13pm UTC](https://forum.ghost.org/t/subscribe-404-on-homepage/31179 "2022-07-06T15:13:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoshFairhead](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@JoshFairhead](https://forum.ghost.org/u/JoshFairhead)\
**Post date:** [July 6, 2022, 3:13pm UTC](https://forum.ghost.org/t/subscribe-404-on-homepage/31179/1 "2022-07-06T15:13:37Z")

</div>

Hello,

I’m just looking for a quick bit of help with subscribe button on the home page. When I click it it leads to a 404; any idea what may be happening?

Mailgun and the rest is setup - you can subscribe down the bottom right of the site but it seems the homepage subscribe is going nowhere. You can check out what I mean by going to [tothecosmos.org](http://tothecosmos.org) if you like.

Thanks in advance for any help 🙂

Warmest,  
j

---

<div class="post-metadata">

**Author:** ![ahmadajmi](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/ahmadajmi/32/23173_2.png) [@ahmadajmi](https://forum.ghost.org/u/ahmadajmi)\
**Post date:** [July 6, 2022, 4:26pm UTC](https://forum.ghost.org/t/subscribe-404-on-homepage/31179/2 "2022-07-06T16:26:17Z")

</div>

@JoshFairhead, welcome to the community!

The subscribe link points to the [https://tothecosmos.org/newsletter/](https://tothecosmos.org/newsletter/) page, which does not exist. That is the reason you get a 404 page instead.

You need to update the Subscribe link `href` value to the Portal link to show the subscribe modal. Something like:

```plaintext
<a href="#/portal/signup" class="m-button filled js-newsletter">Subscribe</a>

```

Here is how you can open and update a theme file:

> **[Open a Ghost theme in a code editor](https://ghost.org/tutorials/open-a-theme-in-a-code-editor/)**
>
> As the saying goes, use the right tool for the job. If you're editing the code of a Ghost theme that means using a code editor. Follow our tutorial to learn how to open a theme.

---

<div class="post-metadata">

**Author:** ![JoshFairhead](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@JoshFairhead](https://forum.ghost.org/u/JoshFairhead)\
**Post date:** [July 6, 2022, 5:56pm UTC](https://forum.ghost.org/t/subscribe-404-on-homepage/31179/3 "2022-07-06T17:56:15Z")

</div>

Thanks for the welcome @ahmadajmi 🙂

Base on the 404 and your response I understand that I’m pointing to a page that doesn’t exist - that’s clear enough, but I’m not sure what to do about it or what you mean by the ‘portal link’?

I guess I’m looking for the subscribe buttons link somewhere but I’m not sure where (I had a look in default.hbs)… then based on your instruction it sounds like I need to add the code you pasted to get it working?

Any ideas where I might find the code to edit?

Thanks for your help! 🙂

Warmest,  
j

---

<div class="post-metadata">

**Author:** ![ahmadajmi](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/ahmadajmi/32/23173_2.png) [@ahmadajmi](https://forum.ghost.org/u/ahmadajmi)\
**Post date:** [July 7, 2022, 3:19pm UTC](https://forum.ghost.org/t/subscribe-404-on-homepage/31179/4 "2022-07-07T15:19:04Z")

</div>

> [@JoshFairhead](#):
>
> ’m pointing to a page that doesn’t exist

Or maybe this is how the theme works and requires you to create a Newsletter page from the admin or upload the routes file. It depends on how the theme works.

> [@JoshFairhead](#):
>
> what you mean by the ‘portal link’?

Ghost provides **Portal Links** to access the Portal from any part of the theme, so if you want to trigger the Signup after clicking a button, you can use the signup link.

**Admin Settings \> Membership \> Portal Settings \> Links**

 ![Screen Shot 2022-07-07 at 5.09.59 PM](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/3/a/3a46759f29017d7991a62a9ae1ca7f8ef1d85164.jpeg)

> **[Ghost Theme Development: Building custom membership flows](https://ghost.org/docs/themes/members/)**
>
> Find out how to build a custom theme for a Ghost Members site, with signup and signin, paid subscriptions, member accounts and more 👉

> [@JoshFairhead](#):
>
> I guess I’m looking for the subscribe buttons link somewhere but I’m not sure where (I had a look in default.hbs)… then based on your instruction it sounds like I need to add the code you pasted to get it working?

Which file exactly is different from one theme to another. You can use the search function in the editor you use and search the theme files for `Subscribe` for example and should return which file the button is located.

---

<div class="post-metadata">

**Author:** ![JoshFairhead](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@JoshFairhead](https://forum.ghost.org/u/JoshFairhead)\
**Post date:** [July 13, 2022, 3:21pm UTC](https://forum.ghost.org/t/subscribe-404-on-homepage/31179/5 "2022-07-13T15:21:43Z")

</div>

> [@ahmadajmi](#):
>
> Admin Settings \> Membership \> Portal Settings \> Links

Thanks for all this detail @ahmadajmi - the simple option was to follow your breadcrumbs above and then copy the Portal link into the “Site Design CTA” custom box (/#/Portal) whic got the subscribe button working again. A bit of a hack around but now knowing about this reference I feel more confident to track it down in the theme itself!

Cheers for the help 🙂

Warmest,  
j
