Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Referring one site name to main web site?

Posted on 2002-06-24
3
Medium Priority
?
167 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 200 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

926 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