{"id":326,"date":"2024-06-09T00:33:02","date_gmt":"2024-06-08T22:33:02","guid":{"rendered":"https:\/\/hostup.se\/support\/?p=326"},"modified":"2024-08-21T00:42:46","modified_gmt":"2024-08-20T22:42:46","slug":"hur-kan-jag-se-hur-min-hemsida-ser-ut-innan-jag-andrar-dns","status":"publish","type":"post","link":"https:\/\/hostup.se\/en\/support\/hur-kan-jag-se-hur-min-hemsida-ser-ut-innan-jag-andrar-dns\/","title":{"rendered":"How can I see what my website looks like before I change the DNS?"},"content":{"rendered":"\n<p>On your computer, you have a .hosts file. This file acts like a local DNS server where you can point any domain name to any IP address without affecting anyone else.<\/p>\n\n\n\n<p>Despite the process seeming complicated, it is entirely possible to make these changes yourself in just a few minutes. This guide will show you how to edit the .hosts file on both Mac and Windows.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Edit the .host file on Mac:<\/h2>\n\n\n\n<p>Video: <a href=\"https:\/\/www.youtube.com\/watch?v=NxorxEaB1Uk\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">https:\/\/www.youtube.com\/watch?v=NxorxEaB1Uk<\/a><\/p>\n\n\n\n<p>To edit the .hosts file on a Mac, you must first open Terminal. Terminal can be found in Applications &gt; Utilities. Once Terminal is open, type the following command in the terminal:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo nano \/etc\/hosts<\/code><\/pre>\n\n\n\n<p>to open the .hosts file in the Nano text editor. You will be prompted to enter your password first.<\/p>\n\n\n\n<p>Once the .host file is open, you can begin making your changes. We need to add a line with the IP address followed by the domain name. If your new IP is 127.0.0.1 for example, and your domain name is example.com, add the following line to point example.com to 127.0.0.1:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>127.0.0.1 example.com<\/code><\/pre>\n\n\n\n<p>After you have added the line, save the file and exit by pressing <code>Control + X<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Edit the .hosts file on Windows:<\/h2>\n\n\n\n<p>Video: <a href=\"https:\/\/www.youtube.com\/watch?v=AC6hs_1_yOI\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">https:\/\/www.youtube.com\/watch?v=AC6hs_1_yOI<\/a><\/p>\n\n\n\n<p>To edit the .hosts file on Windows, you first need to open a text editor with administrative privileges. Notepad is a simple option that&#8217;s available on all Windows computers. Search for Notepad in the Start menu, right-click the icon, and select &#8220;Run as administrator&#8221;.<\/p>\n\n\n\n<p>When Notepad is open, navigate to <code>File &gt; Open<\/code> and browse to <code>C:Windows\/System32\/drivers\/etc\/hosts<\/code>. Make sure to change the file type from <code>Text Documents (*.txt)<\/code> to <code>All Files<\/code> so you can see the .hosts file. Select the file and click &#8220;Open&#8221;. Now you can make your changes just like on a Mac.<\/p>\n\n\n\n<p>When you&#8217;re finished, save the file by selecting <code>File &gt; Save<\/code> or by pressing <code>Control + S<\/code>.<\/p>\n\r\n\t\t\t<div id=\"daexthefu-container\"\r\n\t\t\t\tclass=\"daexthefu-container daexthefu-layout-side-by-side daexthefu-alignment-left\"\r\n\t\t\t\tdata-post-id=\"326\">\r\n\r\n\t\t\t\t<div class=\"daexthefu-feedback\">\r\n\t\t\t\t\t<div class=\"daexthefu-text\">\r\n\t\t\t\t\t\t<h3 class=\"daexthefu-title\">Was this article helpful?<\/h3>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<div class=\"daexthefu-buttons-container\">\r\n\t\t\t\t\t\t<div class=\"daexthefu-buttons\">\r\n\t\t\t\t\t\t\t\r\n\t\t\t<div class=\"daexthefu-yes daexthefu-button daexthefu-button-type-icon\" data-value=\"1\">\r\n\t\t\t\t\r\n                <svg>\r\n                    <defs>\r\n                        <style>.happy-face-cls-1{fill:#c9c9c9;}.happy-face-cls-2{fill:#e1e1e1;}.happy-face-cls-3{fill:#676767;}<\/style>\r\n                    <\/defs>\r\n                    <g id=\"happy_face\">\r\n                        <circle class=\"happy-face-cls-1 daexthefu-icon-primary-color\" cx=\"24\" cy=\"24\" r=\"17\" \/>\r\n                        <path class=\"happy-face-cls-2 daexthefu-icon-circle\" d=\"m24,3c11.58,0,21,9.42,21,21s-9.42,21-21,21S3,35.58,3,24,12.42,3,24,3m0-1C11.85,2,2,11.85,2,24s9.85,22,22,22,22-9.85,22-22S36.15,2,24,2h0Z\" \/>\r\n                        <circle class=\"happy-face-cls-3 daexthefu-icon-secondary-color\" cx=\"18\" cy=\"22\" r=\"2\" \/>\r\n                        <circle class=\"happy-face-cls-3 daexthefu-icon-secondary-color\" cx=\"30\" cy=\"22\" r=\"2\" \/>\r\n                        <path class=\"happy-face-cls-3 daexthefu-icon-secondary-color\" d=\"m16.79,29c-1.19,0-1.89,1.31-1.25,2.32,1.77,2.81,4.9,4.68,8.47,4.68s6.7-1.87,8.47-4.68c.63-1.01-.06-2.32-1.25-2.32-3.67,0-10.76,0-14.43,0Z\" \/>\r\n                    <\/g>\r\n                <\/svg>\t\t\t<\/div>\r\n\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t<div class=\"daexthefu-no daexthefu-button daexthefu-button-type-icon\" data-value=\"0\">\r\n\t\t\t\t\r\n                <svg>\r\n                    <defs>\r\n                        <style>\r\n                            .sad-face-cls-1{fill:#c9c9c9;}.sad-face-cls-2{fill:#676767;}.sad-face-cls-3{fill:#e1e1e1;}.sad-face-cls-4{fill:#676767;}\r\n                        <\/style>\r\n                    <\/defs>\r\n                    <g id=\"sad_face\">\r\n                        <circle class=\"sad-face-cls-1 daexthefu-icon-primary-color\" cx=\"24\" cy=\"24\" r=\"17\" \/>\r\n                        <path class=\"sad-face-cls-3 daexthefu-icon-circle\" d=\"m24,3c11.58,0,21,9.42,21,21s-9.42,21-21,21S3,35.58,3,24,12.42,3,24,3m0-1C11.85,2,2,11.85,2,24s9.85,22,22,22,22-9.85,22-22S36.15,2,24,2h0Z\" \/>\r\n                        <circle class=\"sad-face-cls-4 daexthefu-icon-secondary-color\" cx=\"18\" cy=\"22\" r=\"2\" \/>\r\n                        <circle class=\"sad-face-cls-4 daexthefu-icon-secondary-color\" cx=\"30\" cy=\"22\" r=\"2\" \/>\r\n                        <path class=\"sad-face-cls-2 daexthefu-icon-secondary-color\" d=\"M16.9,34.5c-0.4,0-0.8-0.1-1.1-0.4c-0.6-0.6-0.6-1.5,0-2.1c2.2-2.2,5.1-3.4,8.1-3.4c3.1,0,6,1.2,8.1,3.4\r\n                        c0.6,0.6,0.6,1.5,0,2.1s-1.5,0.6-2.1,0c-1.6-1.6-3.7-2.5-6-2.5s-4.4,0.9-6,2.5C17.7,34.4,17.3,34.5,16.9,34.5z\" \/>\r\n                    <\/g>\r\n                <\/svg>\t\t\t<\/div>\r\n\r\n\t\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\r\n\t\t\t\t<div class=\"daexthefu-comment\">\r\n\t\t\t\t\t<div class=\"daexthefu-comment-top-container\">\r\n\t\t\t\t\t\t<label id=\"daexthefu-comment-label\" class=\"daexthefu-comment-label\"><\/label>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"daexthefu-comment-character-counter-container\">\r\n\t\t\t\t\t\t\t\t<div id=\"daexthefu-comment-character-counter-number\"\r\n\t\t\t\t\t\t\t\t\tclass=\"daexthefu-comment-character-counter-number\"><\/div>\r\n\t\t\t\t\t\t\t\t<div class=\"daexthefu-comment-character-counter-text\"><\/div>\r\n\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<textarea id=\"daexthefu-comment-textarea\" class=\"daexthefu-comment-textarea\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Skriv ditt meddelande\"\r\n\t\t\t\t\t\t\t\tmaxlength=\"\r\n\t\t\t\t\t\t\t\t400\t\t\t\t\t\t\t\t\t\"><\/textarea>\r\n\t\t\t\t\t<div class=\"daexthefu-comment-buttons-container\">\r\n\t\t\t\t\t\t<button class=\"daexthefu-comment-submit daexthefu-button\">Skicka in<\/button>\r\n\t\t\t\t\t\t<button class=\"daexthefu-comment-cancel daexthefu-button\">Avbryt<\/button>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\r\n\t\t\t\t<div class=\"daexthefu-successful-submission-text\">Tack f\u00f6r din feedback!<\/div>\r\n\r\n\t\t\t<\/div>\r\n\r\n\t\t\t","protected":false},"excerpt":{"rendered":"<p>If you have just switched web hosts and want to make sure everything looks right before changing your DNS, you can do so by editing your .hosts file.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_helpful_status":1,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-326","post","type-post","status-publish","format-standard","hentry","category-webbhotell"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/hostup.se\/en\/support\/wp-json\/wp\/v2\/posts\/326","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hostup.se\/en\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hostup.se\/en\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hostup.se\/en\/support\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hostup.se\/en\/support\/wp-json\/wp\/v2\/comments?post=326"}],"version-history":[{"count":5,"href":"https:\/\/hostup.se\/en\/support\/wp-json\/wp\/v2\/posts\/326\/revisions"}],"predecessor-version":[{"id":367,"href":"https:\/\/hostup.se\/en\/support\/wp-json\/wp\/v2\/posts\/326\/revisions\/367"}],"wp:attachment":[{"href":"https:\/\/hostup.se\/en\/support\/wp-json\/wp\/v2\/media?parent=326"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hostup.se\/en\/support\/wp-json\/wp\/v2\/categories?post=326"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hostup.se\/en\/support\/wp-json\/wp\/v2\/tags?post=326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}