{"id":2437,"date":"2012-11-27T15:40:06","date_gmt":"2012-11-27T15:40:06","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2012\/11\/27\/329-hosts-file-prestashop\/"},"modified":"2021-08-16T23:27:44","modified_gmt":"2021-08-17T03:27:44","slug":"329-hosts-file-prestashop","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/","title":{"rendered":"329: How to configure PrestaShop 1.5 with a Temp URL"},"content":{"rendered":"<p>Many people may want to build a new website while maintaining an existing one. An important reason for doing this is to be able to view and test the new site to ensure it will run correctly once the domain name is pointed to it. In many cases, the site owner may try to use a &#8220;Temp URL&#8221;, which is a URL that is used to view a site when the proper domain name is not pointed to it. It is typically long and usually contains a servername or number, and a username. They can appear quite cryptic and are typically only used for testing purposes.<\/p>\n<p>Complex programs, such as PrestaShop, are reliant on the URL. This information is usually stored in more than one place, such as configuration files and one or more database tables, making it difficult to change from the Temp URL to the real domain name when the time comes.<\/p>\n<p>Using a &#8220;Temporary URL&#8221; also may not be the best option due to the way a server, particularly an Apache server, reads path structures for things such as images, and CSS configuration files. If using a Temp URL, these may not work at all. Finally, there are many redirects that can affect areas such as admin logins, causing them not to work properly over a Temp URL.<\/p>\n<p>While you may be able to modify settings and code to work well with the Temp URL, you will then need to undo all the settings once you point the domain to your new site.<\/p>\n<p>There is another option that prevents all the back and forth work. This is known as a hosts file modification. Below are the steps to changing your hosts file to allow you to view your new website just as it would be if you already had your domain name pointed to it.<\/p>\n<p>Be sure to back up the file onto a USB drive or copy it to another directory in case you need to restore it later.<\/p>\n<h2>Modifying your hosts file in Windows<\/h2>\n<p>Your hosts file will be in different places, denending on the version of Windows you are running:<\/p>\n<ul>\n<li><b>Windows 95\/98\/Me<\/b><span class=\"Apple-converted-space\">&nbsp;<\/span><em>c:windowshosts<\/em><\/li>\n<li><b>Windows NT\/2000\/XP Pro<\/b><span class=\"Apple-converted-space\">&nbsp;<\/span><em>c:winntsystem32driversetchosts<\/em><\/li>\n<li><b>Windows XP Home\/Vista\/Windows 7<\/b><span class=\"Apple-converted-space\">&nbsp;<\/span><em>c:windowssystem32driversetchosts<\/em><\/li>\n<\/ul>\n<div>Once you have located the file, open it in a text editor such NotePad. If you get a permissions error during the process, please check the link below for assistance:<br \/>\n<a href=\"https:\/\/support.microsoft.com\/kb\/923947\" style=\"outline: medium none; color: #306090; font-family: Arial,Helvetica,sans-serif; font-size: 11.8182px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: #ffffff;\" target=\"_new\" rel=\"noopener noreferrer\"><\/a><a href=\"https:\/\/support.microsoft.com\/kb\/923947\">https:\/\/support.microsoft.com\/kb\/923947<\/a><\/p>\n<p>Your hosts file should appear something like the example below:<\/p>\n<p><code># Copyright (c) 1993-1999 Microsoft Corp.<br \/>\n#<br \/>\n# This is a sample HOSTS file used by Microsoft TCP\/IP for Windows.<br \/>\n#<br \/>\n# This file contains the mappings of IP addresses to host names. Each<br \/>\n# entry should be kept on an individual line. The IP address should<br \/>\n# be placed in the first column followed by the corresponding host name.<br \/>\n# The IP address and the host name should be separated by at least one<br \/>\n# space.<br \/>\n#<br \/>\n# Additionally, comments (such as these) may be inserted on individual<br \/>\n# lines or following the machine name denoted by a '#' symbol.<br \/>\n#<br \/>\n# For example:<br \/>\n#<br \/>\n# 102.54.94.97 rhino.acme.com # source server<br \/>\n# 38.25.63.10 x.acme.com # x client host<\/p>\n<p>127.0.0.1 localhost<\/p>\n<p><\/code><\/p>\n<\/div>\n<div>&nbsp;<\/div>\n<div>From there, you can add a new address to your file. For example:<\/p>\n<p><code>70.39.145.13 YourRealDomainName.com<br \/>\n70.39.145.13 www.YourRealDomainName.com<\/code><\/p>\n<\/div>\n<div>Note that the IP address will be the one for your hosting server that stores your PrestaShop site. If you need help finding our your shared IP, follow our article <a href=\"\/support\/website\/how-to-find-your-shared-ip-address-of-your-server-in-cpanel\/\">here<\/a>.<\/p>\n<h2>Modifying your Hosts file on a Mac<\/h2>\n<p>Changing your hosts file on a Mac must be done as the &#8216;root&#8217; user in the Terminal application. Below are the steps you will need to take.<\/p>\n<ol class=\"article_list\">\n<li>Open the Mac&#8217;s Terminal application.<\/li>\n<li>Open the <strong>hosts<\/strong> file for editing. From the Terminal window, paste the code below intot he command string and hit <strong>Return<\/strong>.<br \/>\n<code>sudo nano \/private\/etc\/hosts<\/code><\/li>\n<li>Edit the host by adding the following two lines to the end of the file:<br \/>\n<code>70.39.145.13 YourRealDomainName.com<br \/>\n70.39.145.13 www.YourRealDomainName.com<\/code><\/p>\n<p>Be sure to use your servers&#8217;s shared IP address and your actual domain name.<\/li>\n<li>Save the changes to your file by pressing <strong>Control-o<\/strong> on the keyboard and then hit <strong>Return<\/strong>.<\/li>\n<li>You may need to flush your Mac&#8217;s DNS cache to see immediate changes. To do so copy the following code into the <em>Terminal<\/em> program and hit <strong>Return<\/strong><br \/>\n<code>dscacheutil -flushcache<\/code><\/li>\n<\/ol>\n<p>After you have changed your respective hosts file, restart your browser, and use your domain name to view your PrestaShop site.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Many people may want to build a new website while maintaining an existing one. An important reason for doing this is to be able to view and test the new site to ensure it will run correctly once the domain name is pointed to it. In many cases, the site owner may try to use<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/\"> Read More ><\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[92],"tags":[],"class_list":["post-2437","post","type-post","status-publish","format-standard","hentry","category-prestashop"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>329: How to configure PrestaShop 1.5 with a Temp URL | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"This PrestaShop 1.5 tutorial shows you how to configure and test your site while your domain is not pointed.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"329: How to configure PrestaShop 1.5 with a Temp URL | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"This PrestaShop 1.5 tutorial shows you how to configure and test your site while your domain is not pointed.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2012-11-27T15:40:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-17T03:27:44+00:00\" \/>\n<meta name=\"author\" content=\"Scott Mitchell\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Scott Mitchell\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/\"},\"author\":{\"name\":\"Scott Mitchell\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed\"},\"headline\":\"329: How to configure PrestaShop 1.5 with a Temp URL\",\"datePublished\":\"2012-11-27T15:40:06+00:00\",\"dateModified\":\"2021-08-17T03:27:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/\"},\"wordCount\":632,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"Prestashop\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/\",\"name\":\"329: How to configure PrestaShop 1.5 with a Temp URL | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2012-11-27T15:40:06+00:00\",\"dateModified\":\"2021-08-17T03:27:44+00:00\",\"description\":\"This PrestaShop 1.5 tutorial shows you how to configure and test your site while your domain is not pointed.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"329: How to configure PrestaShop 1.5 with a Temp URL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed\",\"name\":\"Scott Mitchell\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/scott\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"329: How to configure PrestaShop 1.5 with a Temp URL | InMotion Hosting","description":"This PrestaShop 1.5 tutorial shows you how to configure and test your site while your domain is not pointed.","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:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/","og_locale":"en_US","og_type":"article","og_title":"329: How to configure PrestaShop 1.5 with a Temp URL | InMotion Hosting","og_description":"This PrestaShop 1.5 tutorial shows you how to configure and test your site while your domain is not pointed.","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2012-11-27T15:40:06+00:00","article_modified_time":"2021-08-17T03:27:44+00:00","author":"Scott Mitchell","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Scott Mitchell","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/"},"author":{"name":"Scott Mitchell","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed"},"headline":"329: How to configure PrestaShop 1.5 with a Temp URL","datePublished":"2012-11-27T15:40:06+00:00","dateModified":"2021-08-17T03:27:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/"},"wordCount":632,"commentCount":4,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["Prestashop"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/","name":"329: How to configure PrestaShop 1.5 with a Temp URL | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2012-11-27T15:40:06+00:00","dateModified":"2021-08-17T03:27:44+00:00","description":"This PrestaShop 1.5 tutorial shows you how to configure and test your site while your domain is not pointed.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/prestashop\/329-hosts-file-prestashop\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"329: How to configure PrestaShop 1.5 with a Temp URL"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed","name":"Scott Mitchell","url":"https:\/\/www.inmotionhosting.com\/support\/author\/scott\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":null,"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/2437","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=2437"}],"version-history":[{"count":3,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/2437\/revisions"}],"predecessor-version":[{"id":85278,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/2437\/revisions\/85278"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=2437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=2437"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=2437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}