Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS How to get URL to example website on my computer?

ILBS

Coder
Hello:

I just finished an example website using HTML/CSS. When I open it from my computer I see its URL in the address bar of Google chrome Ilike this:

file:///Users/bob/Desktop/NEWTEST/index.html

How do I change this path so that I can send a URL to someone so they too can see/access the website from their computer?

All help appreciated!
 
Solution
SIMON TO THE RESCUE lol

So it works like this, i go to www.yourwebsite.co.uk - this is linked to a IP of a server - This server is where your website is hosted usualy with Apache.

Your domain name is simply an easier way of sending people to your servers IP. So what you need to do is first of all get a server, you can get a free one here https://www.000webhost.com/ or with the company i use Linode. You then go to somewhere like Namecheap and buy the domain name, at this point i would recomend registering with CloudFlare and link your domain name to them. Then give Cloudflare your IP for your server and when someone searches for your domain name that will send them to your server. Now get something like FileZilla, upload...
You need to host the website on a web server so someone from the outside can access it. You can either install a server locally on your PC and configure your network to allow outside access (free but not really secure), or you can get a hosting account with someone who offers web hosting and upload your files to the hosting account which will let others access your website.

If all you have is HTML, CSS and Javascript files, you can use the free Github Pages to host your site: https://pages.github.com/

If you just need to have someone preview your site and don't need it live long-term, you can also upload it to Tiiny.host: https://tiiny.host/

If you want more control, look into shared hosting using cPanel. If you Google for "CPanel Web Hosting" you will find lots of hosts that you can pay a few dollars a month to that will host your files online.
 
I'm not familiar with VS Code, but probably not. The easiest option may be to either use Github Pages and download their software, or get a hosting account somewhere and upload the files via FTP.
 
I'm not familiar with VS Code, but probably not. The easiest option may be to either use Github Pages and download their software, or get a hosting account somewhere and upload the files via FTP.
Im not at the office right now but when I get a chance I will provide you the specific link to a short excerpt of the video where the author is talking exactly about this .... but I couldn’t follow along to well .... so maybe you could shine some light on this....

thanks so much
Later
✌️
 
Hey @ILBS!

So the extension you are most likely referring to is called Live Server, which can be found by clicking here. It's an extension for VSCode, which allows you to lunch a local development server to localhost. In addition, as you make changes to the code in VSCode, the extension will automatically reload the page to keep it updated with any new changes.

As mentioned by @Mutiny, you will need to get a server or host to host your website and or you can even use GitHub Pages (Which I recommend), which provides a seamless hosting experience for static pages.

I hope this helps!
 
Hello folks,

Thanks for your replies.

Yes Malcolm, thats exactly what I am referring to. I thought I was able to do what Mutiny was saying with that feature, but I guess not!

Excuse my ignorance but in lamens terms what does it really do when you say "is called Live Server.... allows you to lunch a local development server to localhost???

And when you say that I need a server to host my website, you mean like Godaddy? (I am not familiar with Github). And how do the two connect... (the web host and my URL??

For example, if I open a Shopify store, I registered a URL in shopify and it automatically connects my URL to my Shopify website... Convenient=YES, but I haven't a clue how the two connect to each other.... So now the scenario is different, you want me to register a URL website name and host???? How do I give my website a URL name for example... suppose I want to have a website called abc.com.... how do I name my index.html file to abc.com???

really confused !!! I don't see the whole picture!!!

Thanks
 
Hey @ILBS!

So the extension you are most likely referring to is called Live Server, which can be found by clicking here. It's an extension for VSCode, which allows you to lunch a local development server to localhost. In addition, as you make changes to the code in VSCode, the extension will automatically reload the page to keep it updated with any new changes.

As mentioned by @Mutiny, you will need to get a server or host to host your website and or you can even use GitHub Pages (Which I recommend), which provides a seamless hosting experience for static pages.

I hope this helps!
 
Hello folks,

Thanks for your replies.

Yes Malcolm, thats exactly what I am referring to. I thought I was able to do what Mutiny was saying with that feature, but I guess not!

Excuse my ignorance but in laymen's terms what does it really mean when you say "is called Live Server.... and allows you to lunch a local development server to localhost"???

And when you say that I need a server to host my website, you mean like Godaddy? (I am not familiar with Github). And how do the three connect... (the web host and my URL and my website I create with files in VS code)??

For example, if I open a Shopify store, I register a URL in Shopify and it automatically connects my URL to my Shopify website... Convenient=YES, but I haven't a clue how the two connect to each other.... So now the scenario is different, you want me to register a URL website name and link them to the HTML/CCS files I did in VS Code (Which just that confuses me) and rent space on a hosting platform to host the website... right? I am still confused on how the three things connect to each other??? For example, how do I give my files in VS code a website URL name so I can link it to a web host service???
... suppose I want to have a website called abc.com.... how do I name my index.html file to abc.com and have the web hosting service connect to it???

really confused !!! I don't see the whole picture!!!

Thanks
 
SIMON TO THE RESCUE lol

So it works like this, i go to www.yourwebsite.co.uk - this is linked to a IP of a server - This server is where your website is hosted usualy with Apache.

Your domain name is simply an easier way of sending people to your servers IP. So what you need to do is first of all get a server, you can get a free one here https://www.000webhost.com/ or with the company i use Linode. You then go to somewhere like Namecheap and buy the domain name, at this point i would recomend registering with CloudFlare and link your domain name to them. Then give Cloudflare your IP for your server and when someone searches for your domain name that will send them to your server. Now get something like FileZilla, upload your files and wola you are done :D
 
Solution
SIMON TO THE RESCUE lol

So it works like this, i go to www.yourwebsite.co.uk - this is linked to a IP of a server - This server is where your website is hosted usually with Apache.

Your domain name is simply an easier way of sending people to your servers IP. So what you need to do is first of all get a server, you can get a free one here https://www.000webhost.com/ or with the company i use Linode.
Ok, so when you say "get a server" you mean I register a space so that my website can be hosted on https://www.000webhost.com/ right?

You then go to somewhere like Namecheap and buy the domain name, at this point i would recomend registering with CloudFlare and link your domain name to them.
ok so here we have Namecheap where I buy my domain, and Cloudfare where I register this domain name!!!! When I buy it from Namecheap isn't it already registered ???? why would I need to go register it at Cloudfare????

Would it be easier to buy my Domain name from shopify and register it with cloudFare for domain linking???


Then give Cloudflare your IP for your server and when someone searches for your domain name that will send them to your server. Now get something like FileZilla, upload your files and wola you are done :D
I install FileZilla on my server in CloudFare ????

Is there a good tutorial showing step by step on how to set this up cause Im sadly still confused :-(

thanks for replying!
 
Im just finnishing up something and ill be able to put a little video togther showing how to get it all working :D As for shopify stay away from them crooks :S

127.0.0.1 is a local IP only your PC can use that local host
 
I don't know enough to stay away from Shopify ... they provide many goodies where I don't need to program and Im using page fly which is a drag and drop all sorts of elements ,,,, for now it will have to do
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom