Redirect Addon URLS to Main Domain URLS

peasquared

Registered
Dec 6, 2018
2
1
3
Dallas
cPanel Access Level
Website Owner
Client bought a new domain name and we made it the Primary Domain in shared hosting plan.

We made the old domain name an addon domain in this shared hosting account. So there's an olddomain.com directory in public_html. It's basically empty.

Using the redirect option in Cpanel, olddomain.com home page is properly redirecting to newdomain.com home page as it should.

No files were removed or moved at all. Newdomain.com uses all the same Wordpress files that olddomain.com did, and everything (including Htaccess, if that helps) is in /public_html.

Now we need to setup "one for one" 301 redirects for individual URLs. So olddomain.com/contact-us should redirect to newdomain.com/contact-us for example.

I realize that I don't think I can do one-for-one 301s in Cpanel, but I'm hoping someone can steer me right in my thinking:

Let's say a user clicks on one of our Google Search results: olddomain.com/blog-post.
Well that page/content is gone. It's now newdomain.com/blog-post but search engines and users have no idea about it.

Would I now have to copy all site/wordpress files from public_html (that newdomain.com is using) and put inside olddomain.com directory?

Then once all the duplicated content actually exists, I would tackle 301 redirects via ReWrite rules?

I'm at my breaking point, just can't find any guidance on what to do next. Client's host company support wasn't able to help after being on with them for 3 hours today. I'm so frustrated.

Truly appreciate you taking the time to look at this!
 

peasquared

Registered
Dec 6, 2018
2
1
3
Dallas
cPanel Access Level
Website Owner
I think I may have figured it out! I've placed a separate htaccess file with proper "one for one" redirects in the newdomain.com directory and it seems to be working. It's looking like the actual content didn't need to be added to the olddomain.com directory.
 
  • Like
Reactions: cPanelLauren