Many hosters offer cheap domains without a webhosting package. Some of those hosters e.g. Strato only give you the option to use a frame redirect with this domains. But sometimes you can’t see that restriction when you order the domain.
Some might be happy, as they have a free hosting package with a very long URL, so they can use the frame redirect to only present a short URL to the visitors. But there’a a catch with frame redirects.
The Bookmarking Problem
Navigating through your site works as expected. The visitor can click each link which will update the main frame. Also navigation with the “Back” and “Forward” button works perfectly. But as soon as the visitor finds a nice page he want to add to his favorites, the trouble begins. Not only the title of the bookmark is the domain name, but also the bookmarks target. So when the visitor opens the bookmark he will only get the homepage and he has to navigate to the desired page again.
The Searchengine Problem
Most of the search engines (including Google) have trouble with framebased sites. Most of them can only the the frameset construction which doesn’t contain any content and they can’t access the content of the frames. So in worst case that means that your page with tousands of pages will only have ONE entry in the search engine and this page is the homepage of the redirected domain. A possible solution is to create a sitemap. You should than tell the search engines manually about this sitemap as some of the search engines can’t even find the sitemap on your site. In the sitemap you can use the URL of your webspace or the URL of the domain and append them with the pagename.
Both problems are showing that frame redirects are a relict of the old days and you should avoid to use them. But what to do if your hoster doesn’t support HTTP redirects or only offers them for an additional charge? It’s quite easy, you only have to use a simple trick. You first have to create a new folder on
your site. That you point the domain to this folder. In the folder you create a index.php (or an equivalent index page of another scripting lanuage) with the following content:
<noscript> If you should not be redirected, please click the follwoing link: <a href="http://example.com" target="top">http://example.com</a> </noscript>
The link gets a “target” attribute with the value “top”. So clicking on the link will also update the highest frameset. To enable visitors to access a specific page on your site, you can append the request to the domain. Doing so will redirect the visitor to the correct page on your other domain. Adding the whole code together it should look like this (or similar for other scripting languages):
With this little trick you can by-pass frame redirects but you will than present your visitors a diffrent URL than they have entered. But you should favor this case over breaking the bookmaring feature and the search engine problem. You can still use the short domain in mails and then redirect the visitors. If you want to fully use the domain with your website you have to transfer them to your webhosting package or find a diffrent domain provider that offers HTTP redirects, even if you have to pay an additional charge.