# How To Enable Basic Authentication On Your Site?

> Protect a site with a username and password before it loads: turn on basic authentication from Security → Basic Authentication in xCloud.

Basic authentication asks every visitor for a username and password before the site loads, even before WordPress or your app starts. Use it to keep a staging site, a site under construction or an internal tool private. In xCloud you turn it on per site from **Security → Basic Authentication**.

### **Step 1:** Open your site

Log in to your xCloud dashboard. Click the site you want to protect, or go to the **All Sites** tab and select it.

![Site list in the xCloud dashboard](/_landing/docs/how-to-enable-basic-authentication-on-your-site-site-list.png)

### **Step 2:** Go to Security → Basic Authentication

In the site's left sidebar, open the **Security** menu and click **Basic Authentication**. The menu holds the site's security pages, so you will also find **Overview & Firewall**, **IP Management** and, on WordPress sites, the vulnerability and integrity tools there. On a One-Click App template site that serves a website, Basic Authentication is under **Tools → Basic Authentication** instead. Templates that only run a database or other background service do not have it. OpenClaw, Hermes and DeepSeek Harness sites also have it under **Security → Basic Authentication**; Paperclip sites do not have it.

![Basic Authentication page under the Security menu, with the switch turned off](/_landing/docs/how-to-enable-basic-authentication-on-your-site-security-menu.png)

### **Step 3:** Turn it on and add the credentials

Turn on the **Basic Authentication** switch. Under **Protect Your Site**, enter a **Username** and **Password**, then click **Save**.

![Basic Authentication turned on, with the Username and Password fields and the Save button](/_landing/docs/how-to-enable-basic-authentication-on-your-site-enabled.png)

Open the site in a private browser window: it now asks for the username and password before anything loads. To remove the protection, turn the switch off on the same page.

Getting stuck? Feel free to contact our [support team](/docs/access-built-in-support-portal-in-xcloud/) for further assistance.
