I currently have a domain that started as one of those free web pages 6 years ago.

The problem is search engines (one in particular) picked up the original domain subdomain
and also just the newer domain. www.newdomain.com over the years.
I have a sitemap that give the correct addresses but it appears a redirect is required?

Most search engines have corrected automatically but (G) has both, held the original and it won't let it go and splits the two addresses.(Both are listed same content)
Originally it was www.subdomain.domain.com

We have a domain that has been registered for several years and the web host advises because the subdomain is now actually the newdomain I need to redirect.

The Redirect 301 / http://www.newdomain.com/ to redirect the entire site causes a endless loop (both original www.subdomain.domain.com and www.newdomain.com are using the same .htaccess file because they are the same directory.

I believe I need to redirect only the calls for the original www.subdomain.domain.com
with a filter but have had no success in attempts to write it.

thanks for any help in advance