# Google Ads not showing

**URL:** https://meta.discourse.org/t/google-ads-not-showing/270825
**Category:** Support
**Created:** [July 6, 2023, 10:29pm UTC](https://meta.discourse.org/t/google-ads-not-showing/270825 "2023-07-06T22:29:57Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![dcpartners](https://avatars.discourse-cdn.com/v4/letter/d/a9a28c/32.png) [@dcpartners](https://meta.discourse.org/u/dcpartners)
#### Post date: [July 6, 2023, 10:29pm UTC](https://meta.discourse.org/t/google-ads-not-showing/270825/1 "2023-07-06T22:29:57Z")

</div>

We have subdomain websites as well, the main - called [Dewalist.com](http://Dewalist.com).

We already set up Google Adsense, and working well with the main site and one of the subdomains. But it didn’t work with this website: [ask.dewalist.com](http://ask.dewalist.com), where the Discourse web app is.

We already configured the Adsense Publisher code and the ad unit.

It came up with ADVERTISING text, but no advertising showed up. We checked the view source code, which has the right PUB and ad unit id.

Any ideas?

We are appreciated your feedback.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [July 6, 2023, 10:36pm UTC](https://meta.discourse.org/t/google-ads-not-showing/270825/2 "2023-07-06T22:36:11Z")

</div>

`Content Security Policy: The page’s settings blocked the loading of a resource at https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js (“script-src”).`

---

<div class="post-metadata">

### Author: ![dcpartners](https://avatars.discourse-cdn.com/v4/letter/d/a9a28c/32.png) [@dcpartners](https://meta.discourse.org/u/dcpartners)
#### Post date: [July 7, 2023, 3:20am UTC](https://meta.discourse.org/t/google-ads-not-showing/270825/3 "2023-07-07T03:20:23Z")

</div>

Hi @RGJ

Thanks for the input. Can you elaborate on this, please? What do we need to do?

Thanks

---

<div class="post-metadata">

### Author: ![dcpartners](https://avatars.discourse-cdn.com/v4/letter/d/a9a28c/32.png) [@dcpartners](https://meta.discourse.org/u/dcpartners)
#### Post date: [July 7, 2023, 4:20am UTC](https://meta.discourse.org/t/google-ads-not-showing/270825/4 "2023-07-07T04:20:31Z")

</div>

We researched further on this.

Regarding this CSP, it looks like we need to add this on **app.yml** under **env** section:

```plaintext
DISCOURSE_CSP_DIRECTIVES: "default-src 'self' https://pagead2.googlesyndication.com"

```

We added this, rebuilt the app, restarted the app and still not working.

Any other ideas?

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [July 7, 2023, 5:50am UTC](https://meta.discourse.org/t/google-ads-not-showing/270825/5 "2023-07-07T05:50:14Z")

</div>

Don’t use CSP or let it only reports?

---

<div class="post-metadata">

### Author: ![dcpartners](https://avatars.discourse-cdn.com/v4/letter/d/a9a28c/32.png) [@dcpartners](https://meta.discourse.org/u/dcpartners)
#### Post date: [July 7, 2023, 6:12am UTC](https://meta.discourse.org/t/google-ads-not-showing/270825/7 "2023-07-07T06:12:58Z")

</div>

Hi Jakke

Can you elaborate on this, please?

Thank you

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [July 7, 2023, 6:16am UTC](https://meta.discourse.org/t/google-ads-not-showing/270825/8 "2023-07-07T06:16:21Z")

</div>

Don’t use setting `content security policy` Use setting `content security policy report only ` instead, if CORS is hiding ads.

---

<div class="post-metadata">

### Author: ![dcpartners](https://avatars.discourse-cdn.com/v4/letter/d/a9a28c/32.png) [@dcpartners](https://meta.discourse.org/u/dcpartners)
#### Post date: [July 7, 2023, 6:41am UTC](https://meta.discourse.org/t/google-ads-not-showing/270825/9 "2023-07-07T06:41:06Z")

</div>

OK. I just ticked that now:

```plaintext
content security policy report only

```

Still not working. Do I need to remove CSP?

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [July 7, 2023, 6:43am UTC](https://meta.discourse.org/t/google-ads-not-showing/270825/10 "2023-07-07T06:43:02Z")

</div>

I was going to have another look for you but ads are showing, so better not touch anything anymore 😉

 ![image](https://global.discourse-cdn.com/meta/original/4X/e/e/1/ee103fab0f47cf5a6d533ae5228f7c7122e37182.jpeg)

---

<div class="post-metadata">

### Author: ![dcpartners](https://avatars.discourse-cdn.com/v4/letter/d/a9a28c/32.png) [@dcpartners](https://meta.discourse.org/u/dcpartners)
#### Post date: [July 7, 2023, 6:44am UTC](https://meta.discourse.org/t/google-ads-not-showing/270825/11 "2023-07-07T06:44:06Z")

</div>

I think Jakke’s suggestion worked well.

I might remove the CSP from app.yml stuff
