<p>The cause of this issue with a 90% likelyhood are your <code>craft settings</code></p>

<h3>Before you try any of the below steps, try clearing your cache first!</h3>

<p>Sometimes some leftover cache is all that needs to be removed to fix an issue...
<code>rm -rf runtime/*</code> or <code>./craft clear-caches/all</code></p>

<h3>3 Settings which you may have set wrongly:</h3>

<p>All of the below mentioned settings should basically be pointing towards <code>my_current_website.com</code>, a reference to that or something more relative like a simple <code>/</code>.</p>

<p>There are 3 Places where you should check if you have <code>my_live_website.com</code> set as your current host/site.</p>

<ol>
<li><code>.env</code>'s <code>SITE_URL</code>, <code>BASE_URL</code> or anything else that has  <code>SITE</code> or <code>URL</code> in it's name</li>
<li><code>config/general.php's siteUrl Value(s)</code></li>
<li>Your Craft Control Panel Settings, <code>my_current_website.com/admin/settings/sites</code> (URL may differ based on <code>config/general.php's</code> <code>cpTrigger</code> value)</li>
</ol>

CC BY-SA 4.0
2019-12-10T19:08:20.517Z
Thanks for responding! Unfortunately I double checked all those things and my problem seems to be persisting.
Rain
CC BY-SA 4.0
2019-12-11T07:28:26.103Z
Hmm if it's none of the above, are your entry URLs relative or absolute (and can they contain "other" websites' URLs)? Because if that's the case, then it's quite likely that you have a full URL leading to `my_live_website.com/blog/blog_post_title` set as your `entry.url` for the entry you're testing right now.
Campiotti
CC BY-SA 4.0
2019-12-10T13:09:58.607Z
2019-12-11T07:25:44.287Z
2019-12-11T07:25:44.287Z
Campiotti
<p>I am creating a blog with an index page that links to individual blog show pages. I'm having a weird issue where when I click on the title on the index page <br/>instead of it linking to: <strong>my_current_website.com</strong><code>/blog/blog_post_title</code> <br/>it is linking to: <strong>my_live_website.com</strong><code>/blog/blog_post_title</code>, <br/>which doesn't even exist. Any thoughts on why this would occur? <br/>
<strong>In the template I am setting up the link with <code>entry.url</code>.</strong></p>

<craft3>
Strange Link Problem
# Strange Link Problem

(Asked by: username_0 on 2019-12-09)

I am creating a blog with an index page that links to individual blog show pages. I'm having a weird issue where when I click on the title on the index page   
instead of it linking to: **my\_current\_website.com**`/blog/blog_post_title`   
it is linking to: **my\_live\_website.com**`/blog/blog_post_title`,   
which doesn't even exist. Any thoughts on why this would occur?   
**In the template I am setting up the link with `entry.url`.**

**Tags:** craft3


---

## 1 answers

### Answer by username_1 on 2019-12-10. Score: 1

The cause of this issue with a 90% likelyhood are your `craft settings`

### Before you try any of the below steps, try clearing your cache first!

Sometimes some leftover cache is all that needs to be removed to fix an issue...
`rm -rf runtime/*` or `./craft clear-caches/all`

### 3 Settings which you may have set wrongly:

All of the below mentioned settings should basically be pointing towards `my_current_website.com`, a reference to that or something more relative like a simple `/`.

There are 3 Places where you should check if you have `my_live_website.com` set as your current host/site.

1. `.env`'s `SITE_URL`, `BASE_URL` or anything else that has `SITE` or `URL` in it's name
2. `config/general.php's siteUrl Value(s)`
3. Your Craft Control Panel Settings, `my_current_website.com/admin/settings/sites` (URL may differ based on `config/general.php's` `cpTrigger` value)

> **Comments:**
> **username_0**: Thanks for responding! Unfortunately I double checked all those things and my problem seems to be persisting.  
> **username_1**: Hmm if it's none of the above, are your entry URLs relative or absolute (and can they contain "other" websites' URLs)? Because if that's the case, then it's quite likely that you have a full URL leading to `my_live_website.com/blog/blog_post_title` set as your `entry.url` for the entry you're testing right now.  

---

