Since a development or staging environment is meant for testing, the general public shouldn’t be able to access it. Let's discuss more how you can block and unblock a site in terms of general access.
Blocking and unblocking a site in terms of general access using passwords for dev and staging
So, how do you restrict access to your dev or staging website? The answer is password protection — used as a way to block a site or unblock a site for visitors. When you enable password protection, people can’t view the website unless they enter a username and password.
In such a scenario, even search engines won’t be able to crawl the website.
And on top of keeping your dev or staging website out of the public (and crawlers’) eye, password protection offers several benefits, including securing your website from hackers.
If you’re new to Nexcess or have run into issues trying to enable or disable passwords, this guide is for you. We’ll walk you through how to block and unblock a site step by step. But first, let’s look at some basics.
Password protection — an overview
At Nexcess, creating a dev or staging environment and enabling password protection is a process that takes just a few clicks. So, no matter their level of technical skill, anyone can block or unblock a site.
Moreover, subdomains aren’t used when configuring password protection in the Nexcess system. Therefore, if you were to create a dev or staging domain that’s somewhat similar to your main domain, it would be treated as a unique domain.
Why should you use a dev or staging environment?
To ensure your website performs at peak levels, you must test updates, fix bugs, and troubleshoot errors. And that’s where a dev or staging website comes into play. It lets you see how planned changes will affect your website. And if something goes wrong, it won’t impact your live production site.
While using a dev or staging site, you can still keep your production site live and carry on with business activities. Once you’re done making changes, you can export them to your live website.
With a managed WordPress or WooCommerce plan from Nexcess, you get a free staging site, and you can add a development site plan. You can purchase a dev environment if you opt for a Magento plan. And Nexcess offers several dev site package options starting at $5/month.
Password protection for a staging environment
1. How to block a site in a staging environment
We’ll start our process assuming you’ve already created a staging site. We’ve used an example of a website created under a managed WordPress plan via the Nexcess Client Portal:
- On the left-hand menu, go to Plans.
- Select the plan name, then navigate to the Plan dashboard.
- Next, select the three dots icon on the far right, and then go to the Site dashboard.
- The Management tab will appear on the left vertical menu.
- From there, you can view the Password Protection option.
- Once there, click the Enable button.
There you have it. Following the steps above, you’ve just enabled password protection for your staging website. Your website can now only be accessed by specific users.
Using the File Transfer Protocol (FTP) and Secure Shell (SSH), you can also manually block a site or a specific page.
2. How to unblock a site in a staging environment
The unblock site process is similar to block site process in that you’ll need to log into the Nexcess Client Portal. Next, choose the hosting plan containing the site you intend to unblock. The only difference is that instead of enabling password protection at the end of the process, you’ll disable password protection to unblock the site.
Password protection for a development environment
Let’s review how to unblock and block a site in a dev environment.
1. About the default password protection for a dev environment
When it comes to dev sites, Nexcess auto-generates password protection. Put another way, once you create a dev site, password protection is enabled by default. As a result, he site is blocked.
For example, you'll encounter the following prompt if you attempt to access a dev site protected by a password:
Once you type in the username and password, you can access the website.
The default password can be viewed a limited number of times. To view it, find the eye icon next to the password. You can select it and then click the View Password option to see your view limit. If you exceed the limit, you’ll lose access to the password forever, as it will be permanently deleted from the system.
2. About resetting or disabling password protection for a dev environment
It’s also worth noting that the password expires after a few days. Nevertheless, you’re provided with the option to reset or disable the password.
If you choose the latter, you’ll unblock the site, meaning anyone can view your dev site. All in all, how to unblock a site in a dev environment isn’t a complex process:
Unlike with a dev site, password protection for staging and production sites is disabled by default.
Control access to your staging and dev sites with Nexcess
Now you know how to restrict access to your dev or staging site by enabling password protection.
Nexcess development sites
Nexcess dev sites mirror your production site and environment. While the use of dev and staging environments is best practice, the process for promoting changes to a production site varies. Nexcess dev sites are designed to give developers the framework they need to implement their own process.
But if you ever need help configuring password protection or run into any other issue, you can reach out to our round-the-clock support team. You can also check out our knowledge base for articles discussing many various related topics, such as security tips and best practices for website management.
With Nexcess as a hosting partner, you’ll get access to fully managed hosting so you can focus more on your core business. Not to mention, we offer free migrations.
Contact the Nexcess team to explore our unique web hosting product offerings.