# Hoe maak je een geïmporteerde site niet toegankelijk voor bestaande gebruikers, maar alleen voor personeel en diensten zoals CDN die geconfigureerd moeten worden?

**URL:** <https://meta.discourse.org/t/how-to-make-an-imported-site-not-accessible-for-existing-users-but-only-staff-and-services-like-cdn-that-need-to-be-configured/163901>\
**Category:** Product Support\
**Created:** [13 september 2020 om 20:59 UTC](https://meta.discourse.org/t/how-to-make-an-imported-site-not-accessible-for-existing-users-but-only-staff-and-services-like-cdn-that-need-to-be-configured/163901 "2020-09-13T20:59:18Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)\
**Post date:** [13 september 2020 om 22:03 UTC](https://meta.discourse.org/t/how-to-make-an-imported-site-not-accessible-for-existing-users-but-only-staff-and-services-like-cdn-that-need-to-be-configured/163901/2 "2020-09-13T22:03:27Z")

</div>

AFAIK the simplest way is to make the site `login required`, turn on `must approve users` and aim SMTP at something like mailhog. I don’t recall if the importer approves users automatically, if it does you can do something like this in the rails console:

```
approved_users = AdminUserIndexQuery.new(query: 'approved', stats: false).find_users_query

approved_users.each do |u|
  u.approved = false
  u.save!
end

```

And then turn off approval when you’re good to go.

That way you won’t send any messages publicly during the migration, and can see all of the messages that Discourse has generated in case something goes awry.

Unless you choose to migrate passwords, users will be resetting their credentials anyhow.

---

_[View the full topic](https://meta.discourse.org/t/how-to-make-an-imported-site-not-accessible-for-existing-users-but-only-staff-and-services-like-cdn-that-need-to-be-configured/163901)._
