{"id":23198,"date":"2025-12-01T09:37:03","date_gmt":"2025-12-01T08:37:03","guid":{"rendered":"https:\/\/kunskap.websupport.se\/kb\/test-the-website-on-a-new-hosting-package\/"},"modified":"2025-12-01T09:37:05","modified_gmt":"2025-12-01T08:37:05","slug":"test-the-website-on-a-new-hosting-package","status":"publish","type":"ht_kb","link":"https:\/\/kunskap.websupport.se\/en\/kb\/test-the-website-on-a-new-hosting-package\/","title":{"rendered":"Test the website on a new hosting package"},"content":{"rendered":"<span class=\"su-label su-label-type-success\">Instruktioner l\u00e4mpliga f\u00f6r nyb\u00f6rjare<\/span>\n\n<p style=\"font-size:18px\">If you want to test whether a website works without an active domain, or if you decide to migrate an existing website to a new server and don\u2019t want to change DNS records before checking it first, there are two simple tricks to force your browser to load pages without relying on DNS or making changes. In this guide, we will go through both methods. <\/p>\n\n<hr class=\"wp-block-separator\"\/>\n\n<h2 class=\"wp-block-heading\">Preview URL<\/h2>\n\n<p>To test a website without a domain with us, you can use a so-called Preview URL. It looks like this: <\/p>\n\n<pre class=\"wp-block-preformatted\">http:\/\/d.r101.wbsprt.com\/<strong>dittdom\u00e4n.tld<\/strong>\/  <\/pre>\n\n<p>When using the URL, all you need to do is insert your domain name after yourdomain.tld and open it in your browser like a regular page.<\/p>\n\n<div style=\"height:55px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n<h2 class=\"wp-block-heading\">Edit host file<\/h2>\n\n<p>This method is recommended for testing WordPress and other more complex applications. The hosts file is stored on your computer and contains information about which IP address the browser should use to find the site. If you have already set up a new web host, you just need to update the entry in that file.  <\/p>\n\n<p>Follow these steps to find the IP address you can use to set up the hosts:<\/p>\n\n<ol class=\"wp-block-list\"><li>Log in to your <a href=\"https:\/\/auth.websupport.se\/?s=admin&amp;l=en\" target=\"_blank\" rel=\"noreferrer noopener\">Control Panel \u00bb<\/a><\/li><li>Click on the relevant domain in the list of services<\/li><li>Select DNS from the left-hand menu and click on the &#8220;A&#8221; tab.<\/li><li>Find the DNS record for yourdomain.tld, www.yourdomain.tld, or *.yourdomain.tld.<\/li><\/ol>\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"783\" height=\"363\" src=\"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2020\/12\/chrome_RKWKJkuSyD-783x363.png\" alt=\"\" class=\"wp-image-17498\" srcset=\"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2020\/12\/chrome_RKWKJkuSyD-783x363.png 783w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2020\/12\/chrome_RKWKJkuSyD-50x23.png 50w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2020\/12\/chrome_RKWKJkuSyD-1536x712.png 1536w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2020\/12\/chrome_RKWKJkuSyD-60x28.png 60w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2020\/12\/chrome_RKWKJkuSyD-100x46.png 100w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2020\/12\/chrome_RKWKJkuSyD.png 1617w\" sizes=\"auto, (max-width: 783px) 100vw, 783px\" \/><\/figure>\n\n<p>Before making this setting, we recommend closing all browser windows to ensure that the hosts file edit takes effect. <\/p>\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\"><strong>Tip<\/strong><br>If you cannot find the file in the locations below, we recommend searching on Google using: &#8216;hosts file [your operating system]&#8217;. This should help you find the path for your specific operating system. <\/p>\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n<h3 class=\"wp-block-heading\"><strong>Linux and macOS<\/strong><\/h3>\n\n<p>The best way to work with the Hosts file is by using the Terminal app, which can be found in the Utilities folder on macOS. You can also search for and launch Terminal using the Spotlight feature. On Linux, you can easily find it in the Applications folder.  <\/p>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"783\" height=\"249\" src=\"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2019\/01\/hosts-783x249.jpg\" alt=\"\" class=\"wp-image-5061\" srcset=\"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2019\/01\/hosts-783x249.jpg 783w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2019\/01\/hosts-50x16.jpg 50w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2019\/01\/hosts-60x19.jpg 60w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2019\/01\/hosts-100x32.jpg 100w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2019\/01\/hosts.jpg 1322w\" sizes=\"auto, (max-width: 783px) 100vw, 783px\" \/><\/figure>\n\n<p>Once you have launched the Terminal, enter the following command:<\/p>\n\n<pre class=\"wp-block-preformatted\"> <em>sudo nano \/etc\/hosts<\/em> <\/pre>\n\n<p>Then press ENTER, and you will be prompted to enter a password. Once you have entered your password, the file will open for editing in the Nano text editor. Add any new entries at the end of the document. You can navigate to the end using the arrow keys on your keyboard. The current cursor position is displayed in gray. The document will look something like this:     <\/p>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"783\" height=\"498\" src=\"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2019\/01\/host-file-mac-screenshot-04-783x498.jpg\" alt=\"\" class=\"wp-image-5070\" srcset=\"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2019\/01\/host-file-mac-screenshot-04-783x498.jpg 783w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2019\/01\/host-file-mac-screenshot-04-50x32.jpg 50w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2019\/01\/host-file-mac-screenshot-04-60x38.jpg 60w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2019\/01\/host-file-mac-screenshot-04-100x64.jpg 100w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2019\/01\/host-file-mac-screenshot-04.jpg 1140w\" sizes=\"auto, (max-width: 783px) 100vw, 783px\" \/><\/figure>\n\n<p>In the Hosts file, enter the IP address on the new line, which you found following the steps at the beginning of the manual. Then press the Tab key and type your domain name in the format yourdomain.tld www.yourdomain.tld. These addresses are already separated by a space. However, when using a tab, the IP address and the list of domains must be separated by a single tab, and there must be no extra spaces. Example:  <\/p>\n\n<pre class=\"wp-block-preformatted\">37.9.175.3<strong> [tab] <\/strong>yourdomain.tld www.yourdomain.tld<\/pre>\n\n<p>After editing, press Control + O to tell Terminal to save the file. Then press ENTER to confirm saving, and press Control + X to exit. As a final step, you need to &#8220;flush&#8221; the DNS cache to ensure the changes take effect. Enter the following command:  <\/p>\n\n<pre class=\"wp-block-preformatted\"><em>sudo killall -HUP mDNSResponder<\/em><\/pre>\n\n<p class=\"has-text-color has-medium-font-size\" style=\"color:#0c5f40\"><strong>All done! The page loads correctly from our server.<\/strong><\/p>\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n<h3 class=\"wp-block-heading\"><strong>Windows<\/strong><\/h3>\n\n<p>It looks a bit different on Windows devices. You do not make the change via the Command Prompt (terminal). You can locate the file manually at the following location:  <\/p>\n\n<pre class=\"wp-block-preformatted\">c:\/windows\/system32\/drivers\/etc\n<\/pre>\n\n<p>Open the file as an administrator (right-click &gt; Open as administrator). Insert a new line in the Hosts file, enter the IP address you found following the steps at the beginning of the manual, press the Tab key, and then type your domain name as shown below. <\/p>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"783\" height=\"537\" src=\"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2019\/01\/hosts-windows-783x537.png\" alt=\"\" class=\"wp-image-5139\" srcset=\"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2019\/01\/hosts-windows-783x537.png 783w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2019\/01\/hosts-windows-50x34.png 50w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2019\/01\/hosts-windows-60x41.png 60w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2019\/01\/hosts-windows-100x69.png 100w, https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2019\/01\/hosts-windows.png 1542w\" sizes=\"auto, (max-width: 783px) 100vw, 783px\" \/><\/figure>\n\n<p>Be careful with spaces: the IP address and the list of domains must be separated by a tab, and there must be no extra spaces anywhere. Example: <\/p>\n\n<pre class=\"wp-block-preformatted\"><em>37.9.175.3 <strong>[tab]<\/strong> yourdomain.tld<\/em>\n<em>37.9.175.3 <strong>[tab]<\/strong> www.yourdomain.tld<\/em><\/pre>\n\n<p>Save the file and clear your web browser\u2019s cache.<\/p>\n\n<p class=\"has-text-color has-medium-font-size\" style=\"color:#0c7d54\"><strong>All done! The page loads correctly from our server.<\/strong><\/p>\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>If you want to test whether a website works without an active domain, or if you decide to migrate an existing website to a new server and don\u2019t want to change DNS records before checking it first, there are two simple tricks to force your browser to load pages without&#8230;<\/p>\n","protected":false},"author":8,"template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[424],"ht-kb-tag":[],"class_list":["post-23198","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-web-and-php-settings"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Test the website on a new hosting package - Websupport kunskapsdatabas<\/title>\n<meta name=\"description\" content=\"If you decide to migrate an existing website to a new server and don&#039;t want to change your DNS records, but still want to check it in advance, follow these steps.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kunskap.websupport.se\/en\/kb\/test-the-website-on-a-new-hosting-package\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Test the website on a new hosting package - Websupport kunskapsdatabas\" \/>\n<meta property=\"og:description\" content=\"If you decide to migrate an existing website to a new server and don&#039;t want to change your DNS records, but still want to check it in advance, follow these steps.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kunskap.websupport.se\/en\/kb\/test-the-website-on-a-new-hosting-package\/\" \/>\n<meta property=\"og:site_name\" content=\"Websupport kunskapsdatabas\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-01T08:37:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2020\/12\/chrome_RKWKJkuSyD.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1617\" \/>\n\t<meta property=\"og:image:height\" content=\"750\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kunskap.websupport.se\/en\/kb\/test-the-website-on-a-new-hosting-package\/\",\"url\":\"https:\/\/kunskap.websupport.se\/en\/kb\/test-the-website-on-a-new-hosting-package\/\",\"name\":\"Test the website on a new hosting package - Websupport kunskapsdatabas\",\"isPartOf\":{\"@id\":\"https:\/\/kunskap.websupport.se\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/kunskap.websupport.se\/en\/kb\/test-the-website-on-a-new-hosting-package\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/kunskap.websupport.se\/en\/kb\/test-the-website-on-a-new-hosting-package\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2020\/12\/chrome_RKWKJkuSyD-783x363.png\",\"datePublished\":\"2025-12-01T08:37:03+00:00\",\"dateModified\":\"2025-12-01T08:37:05+00:00\",\"description\":\"If you decide to migrate an existing website to a new server and don't want to change your DNS records, but still want to check it in advance, follow these steps.\",\"breadcrumb\":{\"@id\":\"https:\/\/kunskap.websupport.se\/en\/kb\/test-the-website-on-a-new-hosting-package\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kunskap.websupport.se\/en\/kb\/test-the-website-on-a-new-hosting-package\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kunskap.websupport.se\/en\/kb\/test-the-website-on-a-new-hosting-package\/#primaryimage\",\"url\":\"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2020\/12\/chrome_RKWKJkuSyD-783x363.png\",\"contentUrl\":\"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2020\/12\/chrome_RKWKJkuSyD-783x363.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kunskap.websupport.se\/en\/kb\/test-the-website-on-a-new-hosting-package\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/kunskap.websupport.se\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Test the website on a new hosting package\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kunskap.websupport.se\/en\/#website\",\"url\":\"https:\/\/kunskap.websupport.se\/en\/\",\"name\":\"Websupport kunskapsdatabas\",\"description\":\"Websupport kunskapsdatabas\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kunskap.websupport.se\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Test the website on a new hosting package - Websupport kunskapsdatabas","description":"If you decide to migrate an existing website to a new server and don't want to change your DNS records, but still want to check it in advance, follow these steps.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kunskap.websupport.se\/en\/kb\/test-the-website-on-a-new-hosting-package\/","og_locale":"en_US","og_type":"article","og_title":"Test the website on a new hosting package - Websupport kunskapsdatabas","og_description":"If you decide to migrate an existing website to a new server and don't want to change your DNS records, but still want to check it in advance, follow these steps.","og_url":"https:\/\/kunskap.websupport.se\/en\/kb\/test-the-website-on-a-new-hosting-package\/","og_site_name":"Websupport kunskapsdatabas","article_modified_time":"2025-12-01T08:37:05+00:00","og_image":[{"width":1617,"height":750,"url":"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2020\/12\/chrome_RKWKJkuSyD.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/kunskap.websupport.se\/en\/kb\/test-the-website-on-a-new-hosting-package\/","url":"https:\/\/kunskap.websupport.se\/en\/kb\/test-the-website-on-a-new-hosting-package\/","name":"Test the website on a new hosting package - Websupport kunskapsdatabas","isPartOf":{"@id":"https:\/\/kunskap.websupport.se\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/kunskap.websupport.se\/en\/kb\/test-the-website-on-a-new-hosting-package\/#primaryimage"},"image":{"@id":"https:\/\/kunskap.websupport.se\/en\/kb\/test-the-website-on-a-new-hosting-package\/#primaryimage"},"thumbnailUrl":"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2020\/12\/chrome_RKWKJkuSyD-783x363.png","datePublished":"2025-12-01T08:37:03+00:00","dateModified":"2025-12-01T08:37:05+00:00","description":"If you decide to migrate an existing website to a new server and don't want to change your DNS records, but still want to check it in advance, follow these steps.","breadcrumb":{"@id":"https:\/\/kunskap.websupport.se\/en\/kb\/test-the-website-on-a-new-hosting-package\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kunskap.websupport.se\/en\/kb\/test-the-website-on-a-new-hosting-package\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kunskap.websupport.se\/en\/kb\/test-the-website-on-a-new-hosting-package\/#primaryimage","url":"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2020\/12\/chrome_RKWKJkuSyD-783x363.png","contentUrl":"https:\/\/kunskap.websupport.se\/app\/uploads\/sites\/4\/2020\/12\/chrome_RKWKJkuSyD-783x363.png"},{"@type":"BreadcrumbList","@id":"https:\/\/kunskap.websupport.se\/en\/kb\/test-the-website-on-a-new-hosting-package\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/kunskap.websupport.se\/"},{"@type":"ListItem","position":2,"name":"Test the website on a new hosting package"}]},{"@type":"WebSite","@id":"https:\/\/kunskap.websupport.se\/en\/#website","url":"https:\/\/kunskap.websupport.se\/en\/","name":"Websupport kunskapsdatabas","description":"Websupport kunskapsdatabas","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kunskap.websupport.se\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/kunskap.websupport.se\/en\/wp-json\/wp\/v2\/ht-kb\/23198","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kunskap.websupport.se\/en\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/kunskap.websupport.se\/en\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/kunskap.websupport.se\/en\/wp-json\/wp\/v2\/users\/8"}],"version-history":[{"count":1,"href":"https:\/\/kunskap.websupport.se\/en\/wp-json\/wp\/v2\/ht-kb\/23198\/revisions"}],"predecessor-version":[{"id":23201,"href":"https:\/\/kunskap.websupport.se\/en\/wp-json\/wp\/v2\/ht-kb\/23198\/revisions\/23201"}],"wp:attachment":[{"href":"https:\/\/kunskap.websupport.se\/en\/wp-json\/wp\/v2\/media?parent=23198"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kunskap.websupport.se\/en\/wp-json\/wp\/v2\/ht-kb-category?post=23198"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kunskap.websupport.se\/en\/wp-json\/wp\/v2\/ht-kb-tag?post=23198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}