4

I registered domain www.a.com I then forwarded with masking (using GoDaddy) traffic from www.a.com to www.really.long.url.com, so users will only see www.a.com in their address bar when visiting my site. The problem, is that if a user clicks a link to www.google.com while on my website, they get directed to Google, but their address bar still reads www.a.com.

How can I disable this domain masking for external links?

Cory Klein
  • 51,188
  • 43
  • 183
  • 243
  • This is a "how do I use GoDaddy's interface" question, not a programming question. – Marcus Whybrow Nov 17 '10 at 23:14
  • @Marcus - that may be, but with the right kind of answer, it can also be a "how does domain masking work, what are the drawbacks, and what should I be doing instead" question. But then I'm biased because I just tried to write such an answer and I want your vote ;) – Day Nov 17 '10 at 23:50

2 Answers2

14

Best answer would be "don't use domain masking" because it has many drawbacks including:

  • The problem you have - when users leave your site via links to external sites the address bar still shows your domain.
  • Different pages within your own site don't change the address bar either, so user's can't bookmark individual pages of your site
  • Your favicon won't work
  • Search engines will not index your content as if it belonged to a.com, because it doesn't - it's still being served by really.long.url.com
  • Any RSS feeds advertised by your site will not show up in the address bar on browsers that support this

To avoid these drawbacks, you should configure the DNS for a.com so it and the www CNAME are actually pointed at your webserver, and your website can be served from a.com directly.

Having said that, to solve the question you asked, links to external sites from within a domain masked site should be changed to use the deprecated target="_top" attribute. This breaks out of the invisible frameset that GoDaddy (and others) use to implement the not-very-clever "domain masking". The source of http://www.a.com/ basically looks something like this:

<frameset rows="100%,*" border="0">
  <frame src="http://www.really.long.url.com" frameborder="0" />
</frameset>
Day
  • 9,465
  • 6
  • 57
  • 93
  • Thank you very much! Mys issue was - links won't open on the website once I use GoDaddy's masking "service". The target="_top" absolutely solved this issue. A short question - is there any downside for using that attribute? – golosovsky Mar 28 '15 at 13:16
0

I'll just add extra data regarding the solution @Day provided:

target="_top" will load the entire current browser window with the url specified in the link (Effectively removing the frameset page).

Target:

  • _blank = Link will open in new window

  • _top = Link will clear any existing frames and open URL as the uppermost document

  • _parent = Link will open in parent frame (if several levels deep). Equal to _top if only one level frameset
  • _self = Link will open in current frame/window etc, whichever is applicable

[source: http://www.webmasterworld.com/forum21/4397.htm ]

golosovsky
  • 638
  • 1
  • 6
  • 19