SitePoint Sponsor

User Tag List

Results 1 to 17 of 17
  1. #1
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)

    Assigning pages to domain names

    I have a question about domains.

    Say that I have a page on my computer called 'main.html' If I upload it to the site, how do I assign 'main.html' to the domain (say 'sitepoint.com')?

    That is, how might I assign my webpage to a certain web address?

    Thanks.
    ~TehYoyo

  2. #2
    SitePoint Wizard silver trophy ldcdc's Avatar
    Join Date
    May 2004
    Location
    Ploiesti
    Posts
    4,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That is, how might I assign my webpage to a certain web address?
    Just to be clear, you can't assign a web page to any web address. You generally need to own "sitepoint.com", get a hosting account that will be setup for use with that domain name, change the domain's nameservers so that "sitepoint.com" points to the host's server, upload the main.html file to the hosting account as instructed by your host (typically in the "public_html" folder), and, after the domain propagates, you will be able to visit your page by typing "sitepoint.com/main.html" in a browser.
    HostPeek.com - budget hosts, compared
    CouponsNexus.com - web hosting coupons

    Ultra Cheap Hosts | Web Hosting Reviews Forums

  3. #3
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    So then is it impossible to display a website with the web address 'sitepoint.com'?

  4. #4
    SitePoint Member
    Join Date
    Feb 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think yeah, it's impossible to display it, so what should we do then?

  5. #5
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Dunno, mate. I'm in your boat, if you'll pardon the expression.

    We need the input of an expert here.

    ~TehYoyo

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,331
    Mentioned
    463 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by TehYoyo View Post
    So then is it impossible to display a website with the web address 'sitepoint.com'?
    Yes ... unless you wanted to set this up on your own computer in a local environment that no one else sees. The sitepoint.com domain is owned by SitePoint and is used for their website. Why are you asking this question? What are you trying to achieve here?

  7. #7
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    No the sitepoint.com thing was purely theoretical. I was just using that particular domain name as a common example...lol I'm not going to do anything malicious or anything like that (not to mention that I don't have that skill set or anything close). Sorry if there was a misunderstanding.

    I was just wondering how I could do it for my own website.

    So, if I get you, the only way to display a webpage on a certain domain name is to have a dedicated server that I own?

    Thanks.
    ~ModYoyo

  8. #8
    SitePoint Wizard silver trophy ldcdc's Avatar
    Join Date
    May 2004
    Location
    Ploiesti
    Posts
    4,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So, if I get you, the only way to display a webpage on a certain domain name is to have a dedicated server that I own?
    No, that's not what I meant to say. Perhaps I misunderstood you.

    The general advice remains to get a domain name for your site, and a shared hosting account. A shared hosting account is not a dedicated server, it's just an account on a dedicated server, hence the "shared" bit.

    You can host the site on your own computer if you really want to, but that means you have to keep it on 24/7, and the bill alone will probably make it not worth the effort. I know that some people use XAMMP (http://www.apachefriends.org/en/xampp.html) to host on their own computer. As far as I know, it's by no means secure enough for the purpose, but that doesn't detract some people.

    It is not possible to use someone else's domain name to host your site/content, without their permission.
    HostPeek.com - budget hosts, compared
    CouponsNexus.com - web hosting coupons

    Ultra Cheap Hosts | Web Hosting Reviews Forums

  9. #9
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,331
    Mentioned
    463 Post(s)
    Tagged
    8 Thread(s)
    Ah, lol, it's amazing how easily confusion can arise!

    If you have your own domain, it will need to point to a publicly accessible hosting account. So, you buy a domain name from a domain hosting company (like GoDaddy). Then you also need a publicly accessible computer somewhere on which your website files are stored. Normally, you'd pay a web hosting company a small fee per year to rent some hosting space on one of their specially set up computers. If you are a bit of a geek, you can actually set this up on a computer at home, but you have to have that computer running 24/7 etc.

    Once you have a hosting account, you can use a free program to upload your files to the hosting computer, and then people will be able to view your website at your domain name on the web.

    That's not a very detailed explanation, so if it's not clear, just shout, and I (or someone else) will explain further.

  10. #10
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Yeah. I got most of that (previous experience and the Build Your Own Website The Right Way book).

    My question is, once I've uploaded my files (ie. via Filezilla, etc.) how do I assign main.html to 'www.mydomainname.com' instead of having about.html bet that web address?

    Thanks.
    ~ModYoyo

  11. #11
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,331
    Mentioned
    463 Post(s)
    Tagged
    8 Thread(s)
    Hm, not exactly sure what you are asking. If you upload about.html to your main (root) folder, that page will be viewable at http://www.mydomainname.com/about.html, and main.html will be available at http://www.mydomainname.com/main.html.

    If you want one of those pages to be viewable simply at http://www.mydomainname.com, then rename it to index.html. If you don't specify an actual page when you type in your domain name (e.g. you just type http://www.mydomainname.com into your browser) most web servers will look for a file called "index" to display by default (e.g. index.html or index.php). Some servers will also be happy with home.html.

    So if you want main.html to appear when someone types in your domain name, just rename it to index.html.

    Does that help?

  12. #12
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Does help a lot.

    Thanks a ton.
    ~TehYoyo

  13. #13
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,331
    Mentioned
    463 Post(s)
    Tagged
    8 Thread(s)
    You're welcome.

    Just to add, I don't really like any page to have a .html extension. Rather than a URL like this:

    http://www.mydomainname.com/about.html

    I much prefer URLs like this:

    http://www.mydomainname.com/about/

    You can easily do this by creating a new folder called "about" inside the main root folder. Then move your about.html file to that folder, and change its name to index.html. Then you'll be able to view that page at http://www.mydomainname.com/about/, which I think is a lot neater. It can also be a lot neater to organize your pages into folder like this.

  14. #14
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Ahhhh. I was always wondering about how people did that.

    Thanks a ton!

    ~TehYoyo

  15. #15
    Non-Member
    Join Date
    Apr 2010
    Posts
    298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can change main.html to index.html and make it yoursite.com. That is the easiest method without going through all the trouble of other methods.

  16. #16
    SitePoint Enthusiast Belsnickle's Avatar
    Join Date
    Feb 2012
    Location
    Chico, CA
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The easiest method is index.html/htm renaming mentioned above.

    If you want to change it to be some specified file without having to name it index.html then you have to change the server's index, if you have cpanel it's as easy as clicking Index Manager in the advanced section. If you do not have cpanel the only semi-universal way I'm personally aware of is altering the .htaccess file with:

    Code:
    DirectoryIndex main.html
    You can also get more complicated with .htaccess and do some other things like url rewriting to hide submission data or file types but, at this point that'd probably be a little much so I'll leave it at that.

    If at all possible just renaming the file is recommended.

  17. #17
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Great. I'll make sure to rename it. Thanks all.

    ~TehYoyo


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •