# Can't login after removing all bot user agents from site setting

**URL:** https://meta.discourse.org/t/cant-login-after-removing-all-bot-user-agents-from-site-setting/74704
**Category:** Support
**Created:** [November 23, 2017, 7:56pm UTC](https://meta.discourse.org/t/cant-login-after-removing-all-bot-user-agents-from-site-setting/74704 "2017-11-23T19:56:17Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![atb1248](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@atb1248](https://meta.discourse.org/u/atb1248)
#### Post date: [November 23, 2017, 7:56pm UTC](https://meta.discourse.org/t/cant-login-after-removing-all-bot-user-agents-from-site-setting/74704/1 "2017-11-23T19:56:17Z")

</div>

Disclaimer : I have 24 hours of experience with Discourse.

I just set up a new Discourse (amazing deployment experience by the way, https support was magic), in invite-only mode. I wanted to disallow crawlers and referencement and might have gone too far in this. I set `allow index in robots txt` to false but also **removed all the bot user agents from the list** in a setting that was just under. Sadly, I cannot remember the name of this setting or find it in the api. Since this, it’s impossible to access the admin panel and trying another browser doesn’t work since the login doesn’t work either (there’s no button).

the `robots.txt` looks fine:

> User-agent: \*  
> Disallow: /

I am not 100% confident that my emptying of that user-agent list is the root cause, so I’m open to other interpretations.  
I do not have an API key yet, so I suppose I’ll have to fix this by SSH. Any idea on the steps involved to rebuild that list and fix this?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [November 23, 2017, 8:19pm UTC](https://meta.discourse.org/t/cant-login-after-removing-all-bot-user-agents-from-site-setting/74704/2 "2017-11-23T20:19:34Z")

</div>

Have you tried logging in using [https://your.discourse/u/admin-login](https://your.discourse/u/admin-login)?

---

<div class="post-metadata">

### Author: ![atb1248](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@atb1248](https://meta.discourse.org/u/atb1248)
#### Post date: [November 23, 2017, 9:24pm UTC](https://meta.discourse.org/t/cant-login-after-removing-all-bot-user-agents-from-site-setting/74704/3 "2017-11-23T21:24:47Z")

</div>

This does indeed work for login.  
It appears I do not have access to the admin and settings pages though, here’s a screenshot from the front page (no menu in headers).

 ![1](https://global.discourse-cdn.com/meta/original/3X/3/1/31524c47395dd438f127573ee01a7e3da2c2c2a8.png)  
And another from `/admin`.  
 ![2](https://global.discourse-cdn.com/meta/original/3X/6/f/6fdf33b65d1cb8c85e1da3e96dee427c2253a2bb.png)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [November 23, 2017, 9:42pm UTC](https://meta.discourse.org/t/cant-login-after-removing-all-bot-user-agents-from-site-setting/74704/4 "2017-11-23T21:42:28Z")

</div>

> [@atb1248](#):
>
> I suppose I’ll have to fix this by SSH. Any idea on the steps involved to rebuild that list and fix this?

Here’s how to fix your issue

```plaintext
# ssh into your server
cd /var/discourse
./launcher enter app
rails c
SiteSetting.crawler_user_agents = "*"

```

BTW, if your site is invite only, no bot will be able to crawl it 😉

---

<div class="post-metadata">

### Author: ![atb1248](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@atb1248](https://meta.discourse.org/u/atb1248)
#### Post date: [November 23, 2017, 9:49pm UTC](https://meta.discourse.org/t/cant-login-after-removing-all-bot-user-agents-from-site-setting/74704/5 "2017-11-23T21:49:23Z")

</div>

I’m unable to ssh into the machine until tomorrow, at which point I’ll let you know the result of those commands.  
Thanks a lot for the quick responses.

---

<div class="post-metadata">

### Author: ![atb1248](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@atb1248](https://meta.discourse.org/u/atb1248)
#### Post date: [November 24, 2017, 2:33pm UTC](https://meta.discourse.org/t/cant-login-after-removing-all-bot-user-agents-from-site-setting/74704/6 "2017-11-24T14:33:58Z")

</div>

This did it. Thanks a lot for the quick and concise help!

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [November 24, 2017, 3:30pm UTC](https://meta.discourse.org/t/cant-login-after-removing-all-bot-user-agents-from-site-setting/74704/7 "2017-11-24T15:30:04Z")

</div>


