Solved

Referring one site name to main web site?

Posted on 2002-06-24
3
156 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

746 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now