I have a website hosted with Yahoo Small Business Hosting, and I don't have access to use a .htaccess file.

I have around 220 pages in a folder mysubfolder (http://example.com/myfolder/mysubfolder) and the age of website is around 3 years.

I am planning to move all 220 pages in mysubfolder to myfolder (one level up). All the pages in mysubfolder are indexed.

What is the best way to do this, so that it wouldn't affect my SEO.

  • But the best way to do this is using the .htaccess file ;) Nov 7, 2012 at 7:57
  • 1
    Do you have access to a Page Redirect Manager? "Using Page Redirect Manager, you can create page-level 301 redirects to direct your site pages to new page locations."
    – MrWhite
    Nov 7, 2012 at 8:19
  • @w3d: That looks like an answer to me. Nov 7, 2012 at 23:40

4 Answers 4


Another potential option would be to follow the advice listed here - http://www.craniumstorm.com/moving-wordpress-and-yahoo-small-business-hosting/ and create a redirect file in a index.php file. Now, this may or may not work depending on the site you have setup. If its a CMS based site that defaults to looking for the index.php file first, it will work great. If its a bunch of static html files, probably not so much. Either way it wouldn't hurt to give it a try.

$request = $_SERVER["REQUEST_URI"];
$request_a = explode("/", $request);
$count = count($request_a) - 1;
$request_res = "";
for ($i = 3; $i <= $count; $i++) {
    $request_res .= "/" . $request_a[$i];
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.newdomainfoo.com/bar" . $request_res);

There is also the CSV file upload redirect manager that you could use if you could easily create a list of your current urls, and new urls, however that could be a pain.

The best option would be to migrate away from Yahoo Small Business as it seems rather restricting in many areas. It would be very easy to setup 301 redirects then, but that is outside the purview of your question :)


In order to not impact your SEO, you would need to use a 301 redirect to let search engines know that the pages have permanently moved to the new directory (see the link for more).

Confirmed with a contact at Yahoo Small Business Hosting: You would need to use their Page Redirect Manager tool to setup 301 redirect rules as covered here.

Unfortunately, as with URL rewriting using Apache or other webserver, you can't do this programmatically for all URLs using a regex, you would need to set redirect rules for each URL.

Since many redirects would be needed however, you can upload your redirect rules as a list in a CSV file, as covered here. Using a spreadsheet, you could just do a find/replace to modify your list of old URLs to change them to the new URLs. You can also change the file extension in addition to the directory.

Of special note covered here however, you need to remove all the files at the old location:

When creating and editing redirects in Page Redirect Manager, existing site pages may not be redirected while they still exist on your site — the page at the URL you wish to redirect must be deleted first.

You would also need to update any internal links that point to the old directory in your URLs so that they're not broken, and continue to pass authority. Using the example from the question, search your site and change:

http://example.com/myfolder/mysubfolder to http://example.com/myfolder

Also, try to contact each external site that links to the old URLs to request that they change them to the new URLs.


If you are using some server side language(PHP, Python, ...) is not difficult get all the URLs finishing on mysubfolder/* and then redirect to the new folder using Redirect 301

This is a 301 redirect using PHP:

header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.newdomain.com/newdir/newpage.htm");

If the files are .html and you can't use server side then you should add

<META HTTP-EQUIV=Refresh CONTENT="0; URL=http://mysite.com/myfolder/foo.html">

to all files on subfolder (I recommend download files, then use some text editor with Find & Replace function and upload agin). In any case you should avoid to use Javascript redirect.

  • 2
    "upload a robots.txt file to subfolder" - A robots.txt file should only ever go in the top level folder. ie http://mysite.com/robots.txt. So the disallow line would need to read: Disallow: /myfolder/mysubfolder/ (if this is to be implemented).
    – MrWhite
    Nov 7, 2012 at 12:34
  • 1
    ...and in any case, using robots.txt to disallow the old URLs would mean that search engines will not see the redirects and won't know that the pages have moved. Generally that would be a bad idea. Nov 7, 2012 at 23:37
  • yes, thats right, 301 redirect is the only way to tell the search engines that the page is moved. otherwise it leads to 404 error.
    – n92
    Nov 8, 2012 at 4:10
  • @w3d, updated answer, I had no idea that robots.txt can be only on the root, I thought it worked because I use it to block subdomains, subfolders at the end right? Nov 8, 2012 at 20:06
  • @Tom: It works for subdomains if the robots.txt file is in the top level folder for that subdomain. ie. http://subdomain.mysite.com/robots.txt. If this is also accessible via the subfolder... /mysite.com/subdomain/ then this will not work, it will now look for http://mysite.com/robots.txt. But, as mentioned by Ilmari Karonen above, blocking these files using robots.txt is probably not recommended anyway because you are also blocking the redirect.
    – MrWhite
    Nov 9, 2012 at 0:49

Canonical Links will do what you want. GoogleWebmaster

  1. Copy your existing pages over to your desired directory.
  2. Then on the old pages, the ones you DO NOT want to be indexed by Google, add a canonical link pointing to the new location.
  3. Find & Replace would make quick work of this change to your 220 pages.

Move this page http://www.mysite.com/foo/bar/goo.html
To this location http://www.mysite.com/foo/goo.html
Use <link rel="canonical" href="http://www.mysite.com/foo/goo.html"/> in the head of the old page.

  • Since the OP is specifically asking about 301 redirects for Yahoo Small Business Hosting, they would need to delete all files in the old directory as covered here, and since there would only be one copy of them that would need to be re-indexed, a canonical link is not really necessary because it would just refer to itself.
    – dan
    Feb 28, 2014 at 21:22
  • That page makes no mention of 301 though and he is concerned about seo. Feb 28, 2014 at 21:28
  • Yes it does, see the title. Again, since the old pages would need to be deleted (see the link in my comment), a canonical link is not helpful.
    – dan
    Feb 28, 2014 at 21:30
  • Are you assuming "redirect" to mean 301? Why not 300, 302, 303, 307? Feb 28, 2014 at 21:33
  • Again, the title of the OP's question is asking about 301 redirects, which would indicate to search engines that they permanently moved as needed to maintain SEO. There are multitudes of questions/answers on this site and elsewhere stating the same.
    – dan
    Feb 28, 2014 at 21:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.