Pointing a Domain Name to a Page of a Seperate Site?

Discussion in 'Web Hosting' started by RogerDodgr, Apr 13, 2010.

  1. #1
    I have two websites, for simplicity I will call them:
    old.com
    new.com
    • old.com I have pretty much given up on. After sitting for a couple years, It gets about 400 hits a month and falls a little short of the hosting fees. It has a few javascript games on it.
    • new.com is my shiny new toy. I am messing with it every day and have a couple other people working diligently on it too. I think it has potential, but it needs some traffic to get started.
    
    old_domain_name ---> newSite.com/gamePage.html
    
    Code (markup):
    I want to salvage the traffic from old.com and just make a page on my new site that holds the games from the old site.
    How do I point the oldDomain to a single page on the new site? If this is possible, Is it also possible to keep the old established domain name (with relevent game-related keyword) so that people and search engines see that domain name when they are on the game pages of my new site?

    Domains and hosting accounts are all at GoDaddy.

    Thanks in advance for any tips and suggestions.
     
    RogerDodgr, Apr 13, 2010 IP
  2. Dot.Web

    Dot.Web Guest

    Messages:
    116
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    did you try htaccess? I think it will do.
     
    Dot.Web, Apr 13, 2010 IP
  3. ashwinsatyanarayana

    ashwinsatyanarayana Well-Known Member

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    106
    #3
    This depends on the service you are using. The registrar (the site service that registered the domain) will have a control panel that allows you to to set the DNS records and point hostnames to different servers/IP's

    The exact instructions vary by registrar.

    You could set your record to point to new.com

    www.hostcat.com
     
    ashwinsatyanarayana, Apr 13, 2010 IP
  4. syntaxerrorlagi

    syntaxerrorlagi Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    what about domain forwarding? it can be easily set using your domain manager.
     
    syntaxerrorlagi, Apr 15, 2010 IP
  5. nimonogi

    nimonogi Active Member

    Messages:
    398
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    80
    #5
    Create an .htaccess file in the root directory of your old domain and add the following code:
    
    redirect 301 / http://www.newdomain.com/GamePage.html
    
    Code (markup):
    This will redirect all pages from old domain to GamePage.html of new domain
     
    nimonogi, Apr 17, 2010 IP
  6. Pawell-VW

    Pawell-VW Peon

    Messages:
    40
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Pick Any !

    [B][U]PHP Redirect[/U][/B]
    
    <?
    Header( "HTTP/1.1 301 Moved Permanently" ); 
    Header( "Location: http://www.new-url.com" ); 
    ?> 
    
    [B][U]ASP Redirect[/U][/B]
    
    <%@ Language=VBScript %>
    <%
    Response.Status="301 Moved Permanently"
    Response.AddHeader "Location","http://www.new-url.com/"
    %> 
    
    [B][U]ASP .NET Redirect[/U][/B]
    
    <script runat="server">
    private void Page_Load(object sender, System.EventArgs e)
    {
    Response.Status = "301 Moved Permanently";
    Response.AddHeader("Location","http://www.new-url.com");
    }
    </script> 
    
    [B][U]JSP (Java) Redirect[/U][/B]
    
    <%
    response.setStatus(301);
    response.setHeader( "Location", "http://www.new-url.com/" );
    response.setHeader( "Connection", "close" );
    %> 
    
    [B][U]CGI PERL Redirect[/U][/B]
    
    $q = new CGI;
    print $q->redirect("http://www.new-url.com/"); 
    
    [B][U]Ruby on Rails Redirect[/U][/B]
    
    def old_action
    headers["Status"] = "301 Moved Permanently"
    redirect_to "http://www.new-url.com/"
    end 
    
    [B][U]Redirect Old domain to New domain (htaccess redirect)[/U][/B]
    
    Create a .htaccess file with the below code, it will ensure that all your directories and pages of your old domain will get correctly redirected to your new domain.
    The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)
    
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
    
    Please REPLACE www.newdomain.com in the above code with your actual domain name.
    
    In addition to the redirect I would suggest that you contact every backlinking site to modify their backlink to point to your new website.
    
    Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.
    
    
    [B][U]Redirect to www (htaccess redirect)[/U][/B]
    
    Create a .htaccess file with the below code, it will ensure that all requests coming in to domain.com will get redirected to www.domain.com 
    The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)
    
    Options +FollowSymlinks
    RewriteEngine on
    rewritecond %{http_host} ^domain.com [nc]
    rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]
    
    Please REPLACE domain.com and www.newdomain.com with your actual domain name.
    
    Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.
    
    
    Code (markup):
     
    Pawell-VW, Apr 17, 2010 IP
    RogerDodgr likes this.
  7. nimonogi

    nimonogi Active Member

    Messages:
    398
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    80
    #7
    At least read the requirements before copy/paste something.
     
    nimonogi, Apr 17, 2010 IP
  8. Pawell-VW

    Pawell-VW Peon

    Messages:
    40
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Oh i read it.I know you can atleast use php to achieve it out of all.Now if you expect everyone to write EXACT code for RogerDodgr then i wonder how he'll learn.

     
    Pawell-VW, Apr 18, 2010 IP
  9. RogerDodgr

    RogerDodgr Well-Known Member

    Messages:
    267
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #9
    Thanks Panwell-VW. Even if it was copy/pasted, it provided one detailed option for me, and so I appreciate.

    But, all of those options assume I keep the old hosting account; I would prefer to close the hosting account at oldDomain.com . Whatever actions I take will need to be done at the new hosting server.
     
    Last edited: Apr 18, 2010
    RogerDodgr, Apr 18, 2010 IP
  10. casius

    casius Peon

    Messages:
    168
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    If you are using cPanel or DirectAdmin you even do not need to modify any .htaccess file just go to Site Redirection section and point 301 (permamnent). That is it!
     
    casius, Apr 22, 2010 IP
  11. nunewnew

    nunewnew Peon

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Create. Htaccess file in the root directory of your old domain and add the following code:
    This will redirect all pages from the old domain GamePage.html new domain  If I have any good idea I will post, thx very much
    Code (markup):
     
    nunewnew, Apr 26, 2010 IP