Testing Password-Protected Sites
Many staging and development sites ask for a username and password before they show any page. Your browser shows its own sign-in box, not a page from the site. This is called password protection, or HTTP basic auth, and hosts often turn it on for staging sites by default.
CheckView can test these sites. Save the site’s username and password once, and CheckView sends them on every test, health check and test flow setup.
These are the username and password of that sign-in box, not a WordPress login. If your test flows need to log in to WordPress or WooCommerce, set that up in the test flow as usual.
Where to find them: the protection is usually set in your host’s control panel, under a name such as Password Protection, Basic Authentication or htpasswd, and the panel shows the username and lets you reset the password. If a developer set it up on the server instead, ask them. They are not stored in WordPress.
Before You Start
- For WordPress sites, update the CheckView plugin to the latest version. Older versions cannot work behind password protection, and CheckView will ask you to update. Non-WordPress sites need no plugin.
- Organization admins only: only admins can save, change or remove a site’s password protection credentials. Other team members can see whether credentials are saved.
Adding a Password-Protected Site
- In your dashboard, click the Add Website button and choose the site type.
- Enter the site’s URL.
- Tick the “The site asks for a username and password (password protection)” checkbox.
- Enter the username and password.
- Click Add Website.
CheckView checks the username and password against the site before it adds it. If they are wrong, nothing is added: the dialog says “The site rejected the username and password”, and its Enter username and password button takes you back with the username kept, so you can type the password again.
If you add a protected site without ticking the checkbox, CheckView tells you “This site is password protected” and offers the same Enter username and password button, so you can add them without starting over.
Adding or Changing Them on an Existing Site
- Go to the website and click Settings.
- On the Details page, find the Password protection section.
- Click Turn on, or Enter a new username and password to replace saved ones.
- Enter the username and password and click Check and save.
CheckView checks them against the site first and saves them only if the site accepts them. If it does not, the reason appears under the password field and nothing changes.
To stop using them, click Remove in the same section and confirm. If the site still asks for a password, its tests will fail until you enter them again. Removing them in CheckView does not change your site’s own password protection.
If CheckView Cannot Save Them
These messages appear when a save does not go through: in the Add Website dialog, under the password field in the settings, and when you change a website’s URL, either in the Change Website URL dialog or as a notice on the settings page after it closes. Nothing is saved when you see one.
- “The site’s password protection rejected the username and password. Check them and try again.” The site refused them. Check for typos, or copy them again from your host.
- “This site is password protected. Turn on password protection and enter its username and password to connect it.” You added or moved a site that asks for a password without ticking the checkbox. Click Enter username and password.
- “The site redirects CheckView to [address], which asks for a password. Use that address for the website instead.” The address you entered sends visitors somewhere else, and the password protection is there. Use the address the site redirects to as the website URL. For a site that is not WordPress the message is shorter: “The site redirects to [address]. Use that address for the website instead.”
- “The CheckView plugin is not installed on this site. Install and activate it, then try again.” The username and password worked, but CheckView could not find its plugin on the WordPress site. Install and activate it first. In the Add Website and Change Website URL dialogs you see the Install the WordPress Helper Plugin screen in place of this message.
- “The CheckView plugin on this site cannot work behind password protection yet. Update the CheckView plugin to the latest version, then try again.” The plugin on the site is too old. Update it in WordPress, then save the username and password again.
- “CheckView could not reach the site to check its password protection. Check the address and try again.” The site did not answer. Check the URL and that the site is up.
- “The password protection credentials could not be saved just now. Try again in a few minutes.” A temporary problem on CheckView’s side.
Both fields are required, and the username cannot contain a colon (:), because password protection cannot send one.
How CheckView Keeps Them
- Encrypted: they are encrypted with a key that belongs to your organization.
- Never shown again: once saved, they do not appear in the dashboard, the API, test results or logs. The settings page only says whether they are saved, and for which address.
- Only sent to your site: CheckView sends them only to the site’s own address. Pages on another domain or subdomain, third-party scripts, and payment or analytics services on your pages never receive them, and the network logs saved with your test results never contain them.
Changing the Site’s URL
Saved credentials belong to the address they were saved for. If you change the website’s URL to any other address, CheckView stops sending them, and the settings page says they were saved for the old address. Enter them again for the new address, or tick the password protection checkbox in the Change Website URL dialog and enter them there when you change the URL.
The one exception: changing only http:// to https://, with the rest of the address identical, keeps them. Anything else counts as a new address, including adding or removing www, another subdomain, a port number, or going from https:// back to http://.
Background Tasks Need a Real Cron Job
A password-protected site cannot reach itself. WordPress runs scheduled tasks by calling its own address, and the password prompt blocks those calls. Two things depend on them:
- the CheckView plugin’s clean-up of test submissions;
- emails that some form plugins send in the background, after the form is submitted.
Without them, a Verify Email Delivery step can fail because the email arrives late or never. The fix is to run WordPress’s scheduled tasks from a real cron job on the server instead. Ask your host to turn on a system cron (often listed as system cron, server cron or cron jobs in the hosting panel) and to set DISABLE_WP_CRON to true in wp-config.php, so WordPress stops trying to call itself.
When a Test Fails Because of Password Protection
These messages appear in test results. The first four link straight to the site’s password protection settings.
- “This site asks for a password. Add its username and password under Password protection in the website settings.” The site asks for a password and none is saved. Add them in the Password protection section.
- “The site’s password protection rejected the saved username and password.” The site no longer accepts the saved ones, for example after a password change. Enter the new ones.
- “The site’s password protection credentials were saved for [address], but the site is now [address].” The website’s URL changed to a different address. Enter them again for the new address.
- “The site’s saved password protection credentials can no longer be read.” The saved credentials cannot be used any more. Enter them again.
- “CheckView could not read the site’s saved password protection credentials just now.” A temporary problem on CheckView’s side. CheckView may retry the test on its own; otherwise run it again in a few minutes.
- “The site’s address changed to [address] just as this started. Try again.” The website’s URL was changed while this test was starting. Nothing is wrong with the credentials; run it again.
- “The page at [address] asks for a password.” A test step or a redirect went to an address other than the site’s own (another domain, subdomain, port or
http://address) that has its own password protection. Check the step’s URL under Test Steps, or update the website’s URL if the site has moved.
Limits
- One username and password per website: if parts of the site are protected with different credentials, CheckView can only use the ones saved for the site’s address.
- The website’s picture: the screenshot on the website page is taken once, with the saved credentials, by a job that runs early each morning (6 AM US Eastern). While a site still asks for a password, CheckView skips it and tries again the next morning, so a site added before its credentials were saved gets its picture on the first morning after they are saved.
Using the API or the MCP Server
- Set or replace: when adding or updating a website, send
basic_auth_usernameandbasic_auth_passwordtogether. CheckView checks them against the site before saving. - Remove: send
basic_auth: falseon its own. - Read: the single-website routes (not the website list) include
basic_auth(whether credentials are saved) andbasic_auth_origin(the address they were saved for). Whenbasic_auth_originis not the address of the website’surl(its scheme, host and port), the credentials are not used. The one exception is a move from http to https on the same host. The username and password are never returned. - In the MCP server: the checkview_add_website and checkview_update_website tools take the same fields, and their answers say whether credentials are saved. checkview_update_website can also move a website to a new address (MCP server 1.1.18 or newer): send the new address’s username and password in the same call, or
basic_auth: falsewhen the new address does not ask for one. If saved credentials would not apply at the new address and you send neither, the tool changes nothing and asks which it is. checkview_get_website says whether the saved credentials still apply.