August 5, 2008
Over the past few weeks, several readers have asked how to move BANS off the root of the domain and into a site folder. Almost every BANS store we have setup thus far has put on the root of the domain. Of course when we did this, we never knew that we would want to make changes in the future… but since this is affiliate marketing, change is something we will always have to deal with.
Hopefully, you have taken the advice of many and used Hostgator as your hosting provider. Not only are they very reliable, their support has been grade-A every time I have used them myself. These instructions were written with HostGator users in mind.
BANS File Structure
For most of us, our BANS sites look like: www . MyBANSStore .com/ Lately, I have been in the habit of moving BANS off the root of my domain and into a sub-folder. For example: www .MyBANSStore .com/shop/
The main reason I am doing this is to ease the process of integrating other site features. You see, I am no longer just developing a Build a Niche Store affiliate website, I am developing a content website, that also happens to have an affiliate store! By pulling BANS off the root of the domain, I am free to do whatever I want in the future… add whatever software I find and expand my content website in any way I desire. Every part of the site will come back together in my menu systems!
The videos below discuss the three main scenarios we all face with our file structure. I need to stress that this may not be for everyone, it is just what I am doing on my own sites. There have been many discussions about adding a blog, moving the store etc, and it is a 50/50 opinion, for and against. As you could guess… I am on the “for” side.
Obligatory Warnings
(Or as my Father used to say… You’ve been Warned!)
Some things to consider:
If you have 1500 pages indexed with search engines, you may not want to move your store! There is quite a bit time in setting up the redirects. I have several sites with 100-200 pages indexed… it can be a time consuming process, but for my own needs and goals, was worth it. If you plan on putting WordPress in the root of your domain, there is a plugin that makes the process much easier. It logs every 404 on your site and with the click of a mouse, the redirect is completed, pointing to the new page location.
Video 1 - Your Website is the ONLY Website on the hosting Account!
In this first video, we will move BANS into its own /shop/ folder. This is the method to use if there is only 1 website on the hosting account… there are NO addon domains, etc. This is likely the least common setup for most BANS owners, unless you have only 1 site.
Video Length: 5:46 - Click Here to Watch Video
Video 2 - Your Website is an Addon Domain!
In this second video, which is likely the MOST commonfor BANS owners, we will move our niche store files into a /shop/ directory. Our website was added in cPanel as an addon domain to our primary account.
Video Length: 5:15 - Click Here to Watch Video
Video 3 - Your Website was the Original Website on the hosting account and you have additional Addon Domains!
In this third and final video, we are going to move the very first websitewe setup on our shared hosting account. Since that day, we have added a bunch of addon domains to the same account, but this one… it was the original! This method applies to almost everyone!
Video Length: 5:17 - Click Here to Watch Video
Just to reiterate… please ask questions ahead of time if you are unsure of this process.
Mark
31 Responses to “Moving BANS Off the Root of the Domain”
Got something to say?
Posting tweet...
I’m confused about what you did in Vid 2. It seems that you took your entire subdomain and renamed it Shop, but left it in public-html directory anyway? I have to admit I thought I was watching one of those speedy-fingered shell game hucksters shuffling the pea from under one shell to another… :-)
So if you have a whole lot of subdomains, how would you know which was which if they were all named Shop? Why not just go do the subdomain and rename it Shop, the go into the cont folder and tell it that that BANS subdomain in its entirety is now called Shop? Seems that’s a much direct route that accomplishes the same thing.
Like I’ve said, I know zero about this stuff, but that doesn’t stop me from messing around with it anyway. LOL!
He moved BANS off the root of his domain and into a sub-folder named shop. Now the root domain can be used to install wordpress. The extra stuff was backup and redirect of the bans files.
Anyway I think so and it will get easer as he gets into it.
Wow, Mark you’ve done it again. Thank-you your video was really informative, now I can move my bans to a folder and install WordPress. You broke it down into simple easy to understand steps.
Great tutorial as ever now all we need to know is how to get our chosen wordpress template to match the template of our BANS store! I guess that’s one for another day.
I tried this today on one of my sites and now it’s returning a 404 error on all of the auction pages and the content links take me to a 404 on the blog.
Anyone else?
That’s because (I think) there’s a piece of the instructions missing: the bit where the 301 redirects are made. Mark said in one of these posts that there was a quick & easy push button change-all-the-things-at-once tool, but didn’t say where it was or how to use it. Mark, can you tell us where this is?
Or maybe he was building it? By now I’m so confused about where all the needed info is, I’m afraid to try anything!
But the redirect step is missing from here and that’s why you get all those 404 errors.
No that isn’t it. The redirect step is for the indexed pages in the search engines.
I am returning 404 errors even though I am already on my site.
I figured it out.
You guys need to be careful if you have anything in your .htcaccess file for your BANS store like a canonization code snippet to always send visitors to either the www or non www version. I removed mine and the site works fine now.
The example he showed did not have an .htcaccess file so it might not have come up as an issue.
Who knows….an fyi for anyone that does it though.
@ Bill -
Thank you for finding the missing link in this! I used a standard NEW BANS install, without taking into account any htaccess changes users may have previously made.
Time to edit the post real quickly - Sorry for the headache on it!
Mark
Just got done converting one of my sites….I have to tell you…..this is a LOT of work to do this. IMO you are better off to start with a WP/BANS combination if that is what you are thinking of doing.
I followed Mark’s steps closely and worked through the .htc access issue. Then the hardpart starts and that is rebuilding the site. I used the Redirection plugin to redirect my indexed store pages. Easiest way to do it was to do a site:mysite.com lookup and then just go through the links one by one and enter the redirect.
This particular site had about 60 pages indexed….so it was a lot of work and I know of about 5 or 6 that I still have to do. It works great though in the end.
I would only do it on a site you KNOW is a moneymaker and is worth putting the work into long term. I also found a number of pages and tags that were “sloppy” on my original site so I will be touching those up and tweaking this weekend but for now I’ve had enough. :-)
Mark…thanks for the tutorial….it’s kind of a DUH moment when you watch it done…because it’s really pretty simple….but still a lot of work.
My 2 cents.
@ Bill -
No doubt it is alot of work for an established site!! I have done the same thing myself in regard to site: mysite.com to get alist of the pages indexed… and been overwhelmed!
Which reminds me that eBay is performing a category update very soon… woohoo!
Anyhow - On several other sites, I have taken the route of adding them slowly versus all in one sitting. With the redirection plugin, I just visit the 404 logfile once a day after swapping the site over, any 404’s show in there and I can point/click a redirect in fairly short order. True… I lost one visitor on the 404, but it seems to be easier for me.
Mark
Thankfully I don’t use cat #s very often in most of my stores…..I do in some but most are just custom search strings.
Easier? Did you say easier? :-) If I had more than the 50 or 60 I had then I think I would have gone your route…but it didn’t take that long and I am pigheaded enough to grind it out.
Not to mention the site I converted is a good money maker. ….I didn’t want any 404 pages at all….I have another site that will be up next once I fix this one and that one simply kills.
I am really hesitant to convert it but fortunately it is already WP/BANS so it should be much easier.
Seems to me there should be an easier way to deal with the 301 redirects. Admittedly, I have not moved a BANS site off the root domain and into a subfolder, but I have moved a site from an old URL (i.e. http://www.originalURL.com) to a new URL (i.e. http://www.newURL.com) and the process of redirecting the entire site took less than a minute.
Why couldn’t you add the following to the .htaccess that resides in the root folder?
redirect 301 / http://www.yourURL.com/
Change http://www.mydomain.com to your NEW site’s URL. In this case it would be http://www.yourURL.com/shop/ or whatever you named the folder you moved BANS to.
Has anyone tried this? This works beautifully when moving to a new URL, as long as the page structure is not changed.
Rochelle
This was bugging me so I decided to move one of my BANS sites to a folder and see if I could easily redirect the site.
The above suggestion does NOT work. However, I found a way that takes less than a minute to redirect your entire site to the new folder.
I assume you will already have one, or one will be created, if you are adding a blog to the root folder. Whether you are creating a new .htaccess or adding to one that is already there, add the following:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} yourURL.com [NC]
RewriteCond %{REQUEST_URI} !foldersitemovedto/ [NC]
RewriteRule ^(.*)$ /foldersitemovedto/$1 [R=301L]
The above code will not work unless you have the ‘RewriteEngine On’ and ‘RewriteBase / ‘ code at the top of the .htaccess.
Rochelle
I forgot to mention:
You can verify that your redirecting code works by searching for your site in Google. Enter site:yourURL.com and look at the links that Google has indexed.
Click on any link. You should be redirected to that page’s new location, in the folder. If you get an error then you did not enter the code correctly.
It is a good idea to check your code this way, to make sure you did not make a mistake.
Rochelle
Rochelle…what do you mean that the above suggestion does not work? It’s my site and the redirects work.
I can read PHP about as good as I can chinese so how will that code affect content pages versus store pages and then let’s say your domain URL is indexed…are you going to redirect that to a folder? So basically your homepage is always going to redirect into that folder?
Maybe the code accomodates this but like I said….I don’t have a clue about php.
@Bill,
Lol! I wasn’t talking about your post. I wrote a post in between yours and the one you are talking about that is waiting for moderation from Mark. When (if) Mark approves it you will see that I had made a suggestion about a simpler way to redirect a site, but it didn’t actually work.
So sorry! I didn’t realize my first comment was waiting for moderation when I added my second and third posts, and not visible to any one but me.
As to the home page being redirected, yes, it will be redirected to the folder. But, I am willing to deal with that very small inconvenience if it means I don’t have to manually redirect every page.
I do not see it as that big a deal, especially if I intend to add a blog that links to the main site. I suppose when enough time has passed, and the search engines have reindexed the site properly, you could remove the redirect so the home page is no longer redirected.
Again, I apologize. I never meant to accuse you of having bad redirects, but I can see how it looks like I did.
Rochelle
Actually, I think I need to revise my above statement. It would be a problem for the home page to be redirected because you would never be able to see the home page at the root folder. It would be continually redirected to the folder.
I’ll think about this and let you know what I come up with. Or, perhaps someone else will come up with a solution before me.
Rochelle
No harm….I was just confused….but I seriously don’t think you would want to redirect the home page into the folder.
My 2 cents.
It didn’t really take all that long once you get in a rhythm. The content pages were easy because you could just use the same url for the permalink and they need no redirect….so it’s basically just your store pages.
Yeah, I did not think about the home page issue until you mentioned it. Rats! It was such an easy way to redirect the BANS site. I am still going to ponder this. There may be a way yet (though I am not holding my breath).
Rochelle
@ Rochelle -
Sorry I didnt get the post approved in time for the “Whole” conversation to be read earlier… The comment contained a link, therefore it got queued up for manual approval.
It looks like you walked through several experiments to move it off the root and do a 301 in one shot, but like you have found… you cant.
If you 301 all visits to the main domain, it will never be indexed and instead pass everything to the new shop/ or whatever folder you put BANS into.
Unfortunately, there really is no easy way… except one page at a time. The redirect plugin for WP is priceless in cases like this… but if you have a site that is doing well and is deeply indexed (hundreds of pages, earning $50+ per day) its a hrd call to move it off the root.
Thinking about it as I am typing (which is dangerous) MOST stores are actually in a subfolder already… (I hate to confuse everyone with this, please bear with me) the ONLY page on the root of a domain is you main index or home page. ALL other pages are in the virtual folder name, you named your store!
For instance, if you look at one of my deindexed sites: Carolina Closeouts ONLY the main page is on the root! (Even though all site files are on the root of the domain)
ALL store pages are contained in a virtual /Store/ directory, as seen when you hover over the links in the left menu. This name, “Store” is defined in the very top content page on the site and is named whatever you chose to name your own.
In this case, I could easily move the BANS to a /shop/ or even /store/ folder, then just use the htaccess to 301 the original /Store/ (Yes, it is case sensitive) to the new folder.
Time to do a bit of experimenting myself on this… it may actually be easier!
ROchelle - thank you for turning on my thinking cap!
Mark
Nerd.
;-)
@Mark,
Glad I could turn on your thinking cap : )
I see where store pages are in the virtual ‘Store’ directory, but what about content pages?
Rochelle
I know about the nerd thing! LOL Its much more a case of curiousity than anything!
@ Rochelle - it lookos like most of the content pages are directly on the root, so they would bneed to be manually redirected. Incidentally, ANY stores I have moved, I have converted the content pages to actual blog posts and 301′d through the plugin. NONE of my BANS/Blog sites use the content pages in bans at all…
Mark
If you edit your Wordpress permalinks you have no need to redirect the indexed pages…they will resolve right to the WP posts anyways.
That’s what I did at least.
I just installed the redirect plugin but have to admit I am clueless as to what to do with it. Is there a way it can simply ‘know’ all the pages that need to be redirected? The website for this plugin looks very helpful but I am still not understanding it. What do I do with this plugin?
Rochelle
I just did a site:mysite.com to find my indexed pages.
I then went one by one through the links to see if they needed redirecting. I moved all content pages to a Wordpress “post” instead and edited the permalink to match the old content page URL…that way they did not need redirecting.
In the case of the store pages….it usually went like this…if the indexed URL is http://www.mysite.com/widget then you cut and paste that URL into the “first” URL box….then paste it again into the redirect TO URL box but change it to http://www.mysite.com/shop/widget
The plugin has a lot of other features that aren’t necessary…to just redirect it was setup for me right out of the box just fine.
Works perfect.
Hi Mark,
I followed the instructions in video #1 and now get the following message when I try to access the http://www.mydomain.com/shop
403 Forbidden
You don’t have permission to access /shop on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Please advise.
Thank you.
Ona
Mark,
I figured out the problem. I just needed to update the permissions in the shop folder.
Thanks,
Ona
Video was very helpful and I was thinking of doing this but it does involve some work plus I already have blogs in a blog folder on my sites so to switch both would probably not be worth it.
Going forward I’ll do the shop folder for new sites.