How to access website without domain assigned

General support questions
Post Reply
mirazbira
Posts: 3
Joined: 2016/09/21 12:36:44

How to access website without domain assigned

Post by mirazbira » 2016/09/21 12:41:03

How can I access my website on server using browser without domain assigned ? I would like to make preview my website which is on FTP. Is it possible to access and preview it with any temporary URL before domain will be assigned ? Can you recommend me any procedurer ?

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: How to access website without domain assigned

Post by avij » 2016/09/21 13:33:10

Using the server's IP address may work, like http://192.0.2.42/

You can also add an entry to the hosts file. Add the entry to the computer from where you use the browser, not on the server. On Linux and Mac, the hosts file is at /etc/hosts, and on Windows it's at winnt\system32\drivers\etc\hosts

The row to add is similar to this:

Code: Select all

192.0.2.42 www.example.org

mirazbira
Posts: 3
Joined: 2016/09/21 12:36:44

Re: How to access website without domain assigned

Post by mirazbira » 2016/09/21 13:42:51

avij wrote:Using the server's IP address may work, like http://192.0.2.42/

You can also add an entry to the hosts file. Add the entry to the computer from where you use the browser, not on the server. On Linux and Mac, the hosts file is at /etc/hosts, and on Windows it's at winnt\system32\drivers\etc\hosts

The row to add is similar to this:

Code: Select all

192.0.2.42 www.example.org

But the server is webserver with several websites hosting. I can not call simple IP adress. How can I configure in this case ? i need something like http://192.0.2.42/selectedhosting

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: How to access website without domain assigned

Post by avij » 2016/09/21 13:47:21

Then I'd suggest using the hosts trick. After you have added the appropriate hosts file entry, you can point your browser directly to http://www.example.org/ and it should work.

mirazbira
Posts: 3
Joined: 2016/09/21 12:36:44

Re: How to access website without domain assigned

Post by mirazbira » 2016/09/21 14:01:33

avij wrote:Then I'd suggest using the hosts trick. After you have added the appropriate hosts file entry, you can point your browser directly to http://www.example.org/ and it should work.

I am not shure if I understand you correctly. Will try to explain more detail: I have FTP account on my Centos server (1 server, 10 domains, 1 IP). i haven't got access to domain, it is foreign domain. Domain will be redirected to my server later (I will be webhoster only, not domain holder). Before domain will be assigned to my server I need temporary access to preview the website worldwide with any temporary URL just something like http://192.0.2.42/selectedhosting. I need to use this property without any effect on other domains on server.

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: How to access website without domain assigned

Post by avij » 2016/09/21 14:50:04

Well, the "worldwide" was a new requirement. For a single computer you could have used the hosts trick to override any DNS entries. For example, you could have made www.google.com point to your own web server with this technique.

For the "worldwide" requirement.. Although something like http://192.0.2.42/selectedhosting might be doable, I would suggest using DNS for the task. Obviously the DNS entry would need to be controlled by you. Some companies use a subdomain for such purposes. For your case, it might be something like http://www.someone.clients.mirazbirahosting.com. You would add "www.someone.clients" to the zone of mirazbirahosting.com, configure www.someone.clients.mirazbirahosting.com as an alias for the website in your web server config and hope for the best. This may not always work, because the content may reference resources with URLs pointing to the current domain. For example, if some HTML has <img src="http://www.someone.com/cat.gif">, the image will be requested from the current location (where someone.com's DNS points to) and not from your web server.

In short, depending on what kind of content you have on your server, what you are requesting might not be possible at all. These tricks kind of work OK with specific kinds of static content, but will fail on others.

Post Reply