Solved

Referring one site name to main web site?

Posted on 2002-06-24
3
159 Views
Last Modified: 2010-04-09
My son-in-law owns 3 separate domain names. He wants me to set up one name, ie, www.xyz.com as his main information web site. He says he wants me to reference the other two names somehow in the HTML so in case someone types in i.e., www.pdq.com, it will automatically go to xyz.com. Then we would do the same with the 3rd name, let's call it www.bcc.com. Now both www.pdq.com and www.bcc.com are parked at a web host, so they don't exist on the internet, he simply owns them. Is there a way for me to go about making these refer to the main site? Thanks for your help.
0
Comment
Question by:loybanks
3 Comments
 
LVL 1

Expert Comment

by:mraible
ID: 7105031
You should be able to setup referrals with your hosting provider (or if you are your own, on your DNS server) that points www.pdg.com to www.xyz.com and www.bcc.com to www.xyz.com.

It takes about 5 minutes to do.

Matt
0
 
LVL 1

Accepted Solution

by:
sandyphillips earned 50 total points
ID: 7105278
loybanks,

The easiest way to ensure that everything goes to the "correct" web page is to make use of those funny META tags in the header of all standard web pages. Most people use these tags for storage of information about who developed the page or what editor generated the HTML, etc. However, there is a much overlooked feature of the META tags ... the ability to redirect folks to a new or more pertinent page. By using something like the following, you can take care of the "multiple: URL entry problem you describe:

<meta   http-equiv="refresh"
        content="4;
        URL = http://www.xyz.com/index.htm">

Note two items here: (1) the quotation marks around the content attribute start before the number and end after the full URL. (2) the number following content indicates the number of seconds prior to being redirected. So, in this case, if we arrive at the index page for www.pdq.com, our browser will wait 4 seconds before loading the XYZ home page. This can be anything from 0 (instant redirection) to very large numbers (but why bother). Note also that not all browsers will acknowledge and act on this META tag so you need to include some text with a link to the new page just to make sure.

I have set up an example using two files that I put on my own machine. That's why you see localhost instead of some domain name.

Page 1. This page will automatically call xyz_index.htm after 4 seconds if the user's browser supports it and give the user a link in case their brownser is old/obsolete, etc.
+=+=+=+=++=+=+=+=+ Start File 1 +=+=+=+=++=+=+=+=+

<html>
<!-- Creation date: 6/24/2002 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Redirectable Page for PDQ</title>
<meta name="description" content="Web page showing 'redirection' feature of META tags">
<meta name="keywords" content="META, redirect, tutorial">
<meta name="author" content="Sandy Phillips">
<meta name="generator" content="AceHTML 5 Pro">
<meta http-equiv="refresh" content="4; URL = http://localhost/EEAnswers/xyz_index.htm">
</head>
<body>
<h1>Wrong Page!</h1>
You've reached the wrong page. We have moved to our new location. Please join us at
<a href="http://localhost/EEAnswers/xyz_index.htm">XYZ Corporation</a> if your browser
does not take you there automatically (just click the link)!

</body>
</html>

+=+=+=+=++=+=+=+=+ End File 1 +=+=+=+=++=+=+=+=+

And now the "desired" home page

+=+=+=+=++=+=+=+=+ Start File 2 +=+=+=+=++=+=+=+=+

<html>
<!-- Creation date: 6/24/2002 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Our Homepage</title>
<meta name="description" content="The REAL homepage">
<meta name="keywords" content="redirection">
<meta name="author" content="Sandy Phillips">
<meta name="generator" content="AceHTML 5 Pro">
</head>
<body style="background: #00CCFF">
<h1>YOU MADE IT!</h1>
<br>
<hr>
<p style="font: italic">Welcome to the XYZ home page! We're really glad you're here. If you typed
in WWW.PDQ.COM to get here, please edit your shortcut to reflect this page or bookmark this page
now. Happy browsing.</p>

</body>
</html>

+=+=+=+=++=+=+=+=+ End File 2 +=+=+=+=++=+=+=+=+

Obviously, we can create and deploy as many redirect files as we want using the same technique. Since we can control the amount of time a user sees the "old" page, we can also collect data on that person, ask questions, set cookies, etc. from the old page so we can automatically set up new bookmarks or other "niceties" if we desire.

There are other, more elaborate ways to do this but I think that this will accomplish what you describe in your question.

Sandy Phillips
0
 
LVL 18

Expert Comment

by:bruno
ID: 7108578
loybanks,

mraible's way would be MUCH preferred over the META refresh...due to the fact that you won't need to pay for THREE hosting plans.



BRUNO
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
HTML Relative path 9 32
html input type 3 31
Zoom the page when you go in from your phone 3 53
Python - desktop use 1 30
This article discusses how to create an extensible mechanism for linked drop downs.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question