- Trending Categories
- Data Structure
- Operating System
- C Programming
- Environmental Science
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
See (stage) your website before switching your DNS
When customers are looking to switch hosting providers, they usually stage the setup of their web site before completely switching the DNS (domain name servers). We provide you with a temporary URL so that you can see how your site will look before you switch your domain’s DNS. The problem comes when some scripts require you to access the script through a valid domain name. This poses an issue because you haven’t switched the domain’s DNS and don’t want to until you know the script works 100%.
Here is an easy work around:
1) Upload your site / databases, etc to your new web hosting account.
2) Locate your hosts file on your computer (On Windows XP, it’s located at C:\WINDOWS\SYSTEM32\DRIVERS\etc\HOSTS) and add the following line at the end of the file:
IP_ADDRESS www.yourdomain.com yourdomain.com
Obviously change the IP_ADDRESS and yourdomain.com to the appropriate values. The IP_ADDRESS can be found in your welcome e-mail and also inside of your cPanel account.
3) Hit save, close all your browsers. That’s it.
Also Read : How to redirect HTTP to HTTPS Using htaccess
Now when you load your web site from your computer, you will be able to see your site as if the DNS was pointed to our servers. You can fully stage the setup and ensure all components of your site are in working order. The rest of the world will still be loading from your actual server (since you did not change the domain’s DNS). You can remove the line in the hosts file whenever you’re done staging and your computer will reference your ISP DNS servers as usual.
- What does ‘<?=’ short open tag mean in PHP ?
- PHP Date and Time Function
- How to redirect HTTP to HTTPS Using htaccess
- How to Create a Table in SQL – Postgres and MySQL Example Query
- How to make a chain of function decorators in Python?
- What are Python function attributes?
- See (stage) your website before switching your DNS
- How can we create recursive functions in Python?
- Which is default HTML5 skeleton ?