Pointing a sub domain at add on domain

I have a domain pointed at a site hosted at infinityfree. The site used to be under a sub domain and there are many external links that point to content under the sub domain. To preserve that seo equity, I was using a WordPress plug in to redirect from the sub domain urls to the new, domain urls at a former host. Is there a way to set that up at infinityfree so site.site.com points to site.com and allows the plug in to handle the url redirects?

@webbrewers said:
I have a domain pointed at a site hosted at infinityfree. The site used to be under a sub domain and there are many external links that point to content under the sub domain. To preserve that seo equity, I was using a WordPress plug in to redirect from the sub domain urls to the new, domain urls at a former host. Is there a way to set that up at infinityfree so site.site.com points to site.com and allows the plug in to handle the url redirects?

You will need to create a cname record.
First go to cpanel, Second you go to the cname records settings and then create this record.
In record name put www there and in destination put the subdomain of what your talking about.

Example:
Record Name:
www

Domain:
mydomain.tld

Destination:
mydestinationdomain.tld

Example:

Cname record
www
Domain
site.com
Destination
site.site.com

So site.com points to site.site.com

The only way you can do exactly what you want is if you copy your WordPress files to the folders of both websites. But that sounds like something that would quickly go wrong.

Why do you want to use the plugin so badly? If you just want to redirect all the URLs from one domain to another, you don’t need a full WordPress installation with a plugin for that. If you just want to redirect everything from http://old-domain.test/foo/bar.html to http://new-domain.test/foo/bar.html, you can do that with a few .htaccess rules. No code, plugins, scripts or database required!

as far as SEO is concerned you can use this tool

.htaccess redirect from old to new address/domain
Redirect 301 / http://www.newdomain.com/

Thanks for the responses. I had actually already added an .htaccess file to the sub domain directory which moves requests for the old sub domain to the new site and works fine. I’m new to infinityfree and was really just wondering if there was a trick to point sub domains to a different directory which I couldn’t find and some hosts do offer.
The plug in is needed because it lets me bulk import url mapping which is a big time saver,

@webbrewers said:
Thanks for the responses. I had actually already added an .htaccess file to the sub domain directory which moves requests for the old sub domain to the new site and works fine. I’m new to infinityfree and was really just wondering if there was a trick to point sub domains to a different directory which I couldn’t find and some hosts do offer.
The plug in is needed because it lets me bulk import url mapping which is a big time saver,

I’m not quite sure why you need a URL mapper anyways. Is the URL structure on the new domain different from what it was on the old domain? Because if the URL structure is the same, having WordPress handle the redirects sounds like a waste of processing power.

Yes, the url structure is completely different - the site was originally built in Sharepoint so the url mapper is necessary.

@webbrewers said:
Yes, the url structure is completely different - the site was originally built in Sharepoint so the url mapper is necessary.

Hmm, yes, now I understand why a simple redirect won’t work.

I just got two other ideas. I’m not sure how viable they are, but they might help.

  1. Does the URL mapper support redirecting old URLs to new URLs on the same domain? If so, you could redirect the old domain to the new domain first and then have the URL mapper redirect people to the right URL.

  2. You could add the domain as a Parked Domain to the subdomain. That way, the old subdomain and the new domain would have the same home folder.

Adding rewrite code to an htaccess file in the sub domain directory is working. I didn’t try #2 but seems like a good workaround too.

Be aware of using 301 redirect instead of 302. 302 is only temporary redirections which not pass any link juice.