- Joined
- Feb 16, 2019
- Messages
- 66
- Likes
- 34
- Degree
- 0
I have a bit of a weird situation. I have a Wordpress site that I recently acquired that has some rankings already, but it has a MAJOR issue. both the subdomain and subfolder work site.com/blog and blog.site.com both load the same site, which is a major duplicate content issue. Some posts rank on one site, some rank for the other. It's a mess.
It has to do with the way the original site was set up as it was interacting with a SaaS product main domain on the main domain site.com before I acquired it in an asset sale.
Digging into the site, I don't see an obvious way to turn off the sub-domain version without killing the subfolder version. I've tried a few methods.
So I figured the best way would be to make the subdomain version canonical to the subfolder one. Where the canonical structure would point like this automatically:
blog.site.com -> site.com/blog
blog.site.com/post-1 -> site.com/blog/post-1
blog.site.com/category2 -> site.com/blog/category2
To help pass over rankings and link juice, I think this would be the simplest solution. I couldn't find a plugin to do this for me.
Does anybody have any idea on how to do this? Maybe with a PHP file change or something?
Since they're mirrors of each other, whatever change would reflect on both versions, but as long as the subfolder version is the one that is always listed, I think it'll be fine.
Would appreciate any help!
It has to do with the way the original site was set up as it was interacting with a SaaS product main domain on the main domain site.com before I acquired it in an asset sale.
Digging into the site, I don't see an obvious way to turn off the sub-domain version without killing the subfolder version. I've tried a few methods.
So I figured the best way would be to make the subdomain version canonical to the subfolder one. Where the canonical structure would point like this automatically:
blog.site.com -> site.com/blog
blog.site.com/post-1 -> site.com/blog/post-1
blog.site.com/category2 -> site.com/blog/category2
To help pass over rankings and link juice, I think this would be the simplest solution. I couldn't find a plugin to do this for me.
Does anybody have any idea on how to do this? Maybe with a PHP file change or something?
Since they're mirrors of each other, whatever change would reflect on both versions, but as long as the subfolder version is the one that is always listed, I think it'll be fine.
Would appreciate any help!