I never noticed this before, but one of my sites has domain forwarding with masking enabled, which is adding an iframe to wrap the site. This is bad for SEO and bad for responsive design. Is it possible to forward the domain with masking without using iframes?
My ultimate goal:
I have two domain names:
domain1.com domain2.com
domain1.com points to site1 on my server (A record). I wanted to point domain2.com to a page on that same site1. So when I type domain2.com arrive at domain1.com/mypage, but the URL display domain2.com
This works with forwarding with masking, but as I pointed out, that's not a good solution.
UPDATE:
So I have switched things around a bit.
Now I have both domains pointing to the same IP address. In Cpanel I've added the second domain as a parked domain. That way I can navigate the site with either domain without the URL switch up top.
Now this is what I am trying to accomplish:
If the site is accessed via domain2 then the user should be redirected to another page (not the home page). I believe I can accomplish this with htaccess which I know little about. But the idea is to do something similar to this in htaccess;
if(domain2){ //redirect to domain2.com/domain2-page }else{ //redirect to domain1.com }