# Disable chat from certain pages

**URL:** <https://community.hubspot.com/t/disable-chat-from-certain-pages/27934>\
**Category:** Sales Hub Tools\
**Tags:** chat, professional\
**Created:** [November 12, 2020, 4:19pm UTC](https://community.hubspot.com/t/disable-chat-from-certain-pages/27934 "2020-11-12T16:19:39Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkranitz](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mkranitz/32/27794_2.png) [@mkranitz](https://community.hubspot.com/u/mkranitz)\
**Post date:** [November 12, 2020, 4:19pm UTC](https://community.hubspot.com/t/disable-chat-from-certain-pages/27934/1 "2020-11-12T16:19:39Z")

</div>

Hi all,

There are some pages on my website that I don’t want the chat agent to pop up. I am using Wordpress (X Theme) and I had previously been able to disable it from loading on certain pages by adding something like this:

#hubspot-messages-iframe-container {  
display: none !important;  
}

I did a theme update and it seems to have removed the code that was preventing chat from popping up. 😞

Here’s the rub: I don’t remember where I changed it, and I don’t remember if the above was the exact code that I used! I probably spent two hours figuring it out last time and I was hoping that I could toss this out to you guys for help instead of spending another two hours trying to figure it out!

THANKS in advance,

Mitch

---

<div class="post-metadata">

**Author:** ![Josh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/josh/32/17115_2.png) [@Josh](https://community.hubspot.com/u/Josh)\
**Post date:** [November 12, 2020, 4:36pm UTC](https://community.hubspot.com/t/disable-chat-from-certain-pages/27934/2 "2020-11-12T16:36:38Z")

</div>

Hi @mkranitz,

I prefer to disable the chat on specific pages using the “Target” settings in the chat setup. Here’s an example screenshot:

 ![34219i7C4A9E8A1C2905CC.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/c/a/ca92a9105e38530627d6ddb9ab19c936450d8ef0.png)

This should do the trick!

Josh

---

<div class="post-metadata">

**Author:** ![mkranitz](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mkranitz/32/27794_2.png) [@mkranitz](https://community.hubspot.com/u/mkranitz)\
**Post date:** [November 12, 2020, 4:48pm UTC](https://community.hubspot.com/t/disable-chat-from-certain-pages/27934/3 "2020-11-12T16:48:14Z")

</div>

OK! This is a fantastic answer… (here comes the but…)

BUT, I have a bit of a weird situation. I don’t have regular admin access to HubSpot! That, plus I am also using the plugin on a site that is not our primary site. In other words, we use [www.xyz.com](http://www.xyz.com) as our primary domain with HubSpot. I started a new sales channel for the company and along with that I created a new [www.abc.com](http://www.abc.com) domain to represent our mission and bring in the cheddar. I added the hubspot plugin to our wordpress instance and ever since, the popups started. I DO have access to every aspect of Wordpress/Domain/etc for the [www.abc.com](http://www.abc.com) site so I figured if I could do it with code, I wouldn’t have to mess with the admin portal.

Regardless, I’m going to schedule time to work with our HubSpot admin to review the settings you suggested and see if that floats.

Thanks a bunch, @Josh

Mitch

---

<div class="post-metadata">

**Author:** ![Josh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/josh/32/17115_2.png) [@Josh](https://community.hubspot.com/u/Josh)\
**Post date:** [November 12, 2020, 4:50pm UTC](https://community.hubspot.com/t/disable-chat-from-certain-pages/27934/4 "2020-11-12T16:50:50Z")

</div>

Hi @mkranitz,

If you’re able to get the access you need to HubSpot for that chat, you should be able to put the full path of the URL for the exclusion. That should solve the issue of [xyz.com](http://xyz.com) vs [abc.com](http://abc.com).

Josh

---

<div class="post-metadata">

**Author:** ![mkranitz](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mkranitz/32/27794_2.png) [@mkranitz](https://community.hubspot.com/u/mkranitz)\
**Post date:** [November 12, 2020, 5:47pm UTC](https://community.hubspot.com/t/disable-chat-from-certain-pages/27934/5 "2020-11-12T17:47:47Z")

</div>

Bingo. I’ll try this afternoon and update you shortly after. THANKS

---

<div class="post-metadata">

**Author:** ![donrua](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/donrua/32/65886_2.png) [@donrua](https://community.hubspot.com/u/donrua)\
**Post date:** [March 26, 2021, 6:49am UTC](https://community.hubspot.com/t/disable-chat-from-certain-pages/27934/6 "2021-03-26T06:49:18Z")

</div>

Does using this method prevent the live chat code from loading? We are getting significant hits on page speed from fetching, reading and/or managing the code.

---

<div class="post-metadata">

**Author:** ![tc\_tempokit](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tc_tempokit/32/74736_2.png) [@tc\_tempokit](https://community.hubspot.com/u/tc_tempokit)\
**Post date:** [May 27, 2021, 3:33am UTC](https://community.hubspot.com/t/disable-chat-from-certain-pages/27934/7 "2021-05-27T03:33:53Z")

</div>

Hi,

How do i get to the “Target” settings in the chat setup?

I don’t see a Target settings on the chat page:

 ![Screen Shot 2021-05-26 at 8.33.14 PM.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/6/1/611ea885ed59d90ec09c183a41d9ae316c8c39b1.png)

---

<div class="post-metadata">

**Author:** ![AJacovchak](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@AJacovchak](https://community.hubspot.com/u/AJacovchak)\
**Post date:** [January 16, 2022, 4:42pm UTC](https://community.hubspot.com/t/disable-chat-from-certain-pages/27934/8 "2022-01-16T16:42:12Z")

</div>

Same here.  
Can anyone tell us where to find the Target settings?

---

<div class="post-metadata">

**Author:** ![sanjivlondon](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sanjivlondon/32/29572_2.png) [@sanjivlondon](https://community.hubspot.com/u/sanjivlondon)\
**Post date:** [August 8, 2021, 11:57am UTC](https://community.hubspot.com/t/disable-chat-from-certain-pages/27934/9 "2021-08-08T11:57:26Z")

</div>

Hello

I wanted to ask two questions about the chat functionality because it seems there is something not right in expected behavior

1. We have implemented the chat on our website and when a user comes to our website and clicks on the chat icon and add a message and stop . After that user goes to a new page where the chat opens again where the user left the previous chat - Is it possible if we can configure that when a user goes move out a new page then chat window does not open and only the chat icon shows otherwise chat window takes 75% of the screen of the website.

2. On the mobile when we perform the same action it’s worst because once a user opens the chat the webpage goes back in the background and there is no option for the chat to be closed which is very frustrating and does not work as expected. The expectation is once a user clicks on chat on mobile a pop should open for chat but there should be an option to close the chat which does not seems to be there.

https://www.youtube.com/embed/9-0jkHyjevA?feature=oembed&wmode=opaque

1.

---

<div class="post-metadata">

**Author:** ![LJohnson47](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ljohnson47/32/196713_2.png) [@LJohnson47](https://community.hubspot.com/u/LJohnson47)\
**Post date:** [October 24, 2022, 8:48pm UTC](https://community.hubspot.com/t/disable-chat-from-certain-pages/27934/10 "2022-10-24T20:48:29Z")

</div>

can you help me navigate to this screen after already having set up chat i need to disable on landing pages.

---

<div class="post-metadata">

**Author:** ![kvlschaefer](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kvlschaefer/32/71076_2.png) [@kvlschaefer](https://community.hubspot.com/u/kvlschaefer)\
**Post date:** [October 25, 2022, 11:24am UTC](https://community.hubspot.com/t/disable-chat-from-certain-pages/27934/11 "2022-10-25T11:24:59Z")

</div>

Hi @LJohnson47,

Thank you for reaching out!

This thread is 2 years old and may not have full visibility among our Community Members.

To ensure that your question is seen by our community members, I would encourage you to create a new post on the Community.

Please make sure to include a full description of the issue you are running into or your goal and any pertinent screenshots in the new post for the Community to better assist with the next steps.

Thank you

Best,

Kristen

---

<div class="post-metadata">

**Author:** ![mkranitz](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mkranitz/32/27794_2.png) [@mkranitz](https://community.hubspot.com/u/mkranitz)\
**Post date:** [November 12, 2020, 5:52pm UTC](https://community.hubspot.com/t/disable-chat-from-certain-pages/27934/12 "2020-11-12T17:52:58Z")

</div>

I was able to accomplish the change by using the following in the theme’s (X Theme Pro) CSS settings:

.page-id-135 #hubspot-messages-iframe-container { display: none !important; }

I’m going to mark your answer as the solution, though, as it’s clear to me that your approach would work perfectly fine.

Thanks again!
