Personal Blog

How Do I Redirect My Old Domain To a New URL But Keep The Domain in the Address Bar?

I searched for hours trying to do this by .htaccess and then found I could do it by creating an html index page for the old domain and then adding the following code:

<iframe style='position:absolute;z-index:10;top:0;left:0;margin' 
width='100%' height='100%' scrolling='auto' marginwidth='0'
marginheight='0' align='top' frameborder='0' SRC='http://new-url-here.tld' />
</iframe>

The index page for the old domain loads and keeps the old domain’s address in the web browser. The page imports the content for the new domain. Whilst doing this might serve as a useful function, you should be aware that it will destroy any SEO and Google listings for the old domain.