Forum Moderators: phranque
I have a small site with 30 pages, all indexed in Google, which I would like to move.
These index pages are buried within the site and I thought I would like to move the HTML out of each particular folder to place them next to the root, just one directory deep instead of three.
Problem is pages have been indexed already and are driving traffic. The minute I make those changes, surfers referred by search engines will get an error.
What would be the most appropriate procedure to move files without disturbing results? Having a duplication for a while until the newly placed files get indexed? Permanent redirect in each folder will possibly affect server performance...
Search engines do not care how deep your pages are in your directory structure. Your server uses file paths, but the Web uses URLs. Therefore, it is the length of the click-path that matters, not the directory structure on your server. Search engines will follow the links from one page to the next, and do not care what the URL actually is. One click deep on your site is better than two clicks deep on your site, but the length of the file names (within reason) doesn't matter to search engines as far as page ranking goes.
You can treat file paths (directories & filenames) as one addressing scheme, and URLs as another. They need not have ANY relation to each other. In most cases, there is a partial relationship, with the subdirectory and filenames overlapping. But the left end of a URL and the server name, account name, and top directory filename on a given account rarely have much in common.
If you still decide you need to re-arrange your pages, then a few redirects are not going to slow anything down to any measurable degree unless you are a major site getting a hundred thousand uniques a day. Remember that the most likely bottleneck on a server is that network interface. Even at 100Mbps, it is slow compared to the processor.
BTW, I am often amused by the level of anxiety expressed concerning the performance of redirects and mod_rewrite, when often, after some discussion, it turns out that the whole site is script-based. A couple of hundred lines of mod_rewrites or RedirectPermanents is not even going to show up as a performance factor on an ASP or PHP-based site!
I have about 300 lines of redirects, IP and UA blocks, and other config stuff in my .htaccess file. Effect on performance? Negligible.
You can place all the redirect directives in your Web root folder to keep things easy to manage.
So, do what you need to do, test it, and don't worry. :)
HTH,
Jim
I was thinking more on .htaccess files inside of each folder as opposed to having one at the root level. Won't Apache query all folders/files every time it finds one? That is why I thought of performance hit...But perhaps I should state clearly what my objective is.
I have noticed my index page has a PR of 4, but the inner pages of 2. The structure goes like this:
root/folder/folder/index.html
or
root/folder/index.html
I have noticed also that the few pages that are closer to the root, like in root/somepage.html, the PR is higher.
The point in moving the html files out of the folders (leaving only the images inside), is to distribute PR more efficiently.
The site is not scripted, just plain simple HTML. If I make those changes and readjust for broken links, I will still have to wait for Google the re-index the new paths to the index pages, no? So, that is my concern. That if I make the changes when freshbot is running, there may still be an uptime lost untill the pages get finally indexed. What happens to the surfers who click on the old indexed links? those will be there until the newer ones are up...
Am I making it a lot more complicated than it truly is?
Robert,
Your lucky day. I happen to have some experience which is nearly identical to your own situation.
My dot com site was created before my dot net site. In the beginning on my com site I had some pages in subsfolders which returned #1 in their specific category. These pages were created with that in mind. In addition I had two other subfolders with higher traffic and higher ranking pages than my root page.
Once my com site was established I moved the #1 ranking subfolder over to the net site. Not losing either ranking or traffic in the process.
Later this same move was duplicated with the other two subfolders as well. This transition time (of about two years) of pulling in traffic I didn't actually desire on my com site help to establish the pages I do desire.
The key is redirects from your ROOT folder. The SE's will pick up on properly placed redirects. Indexing the new page addresses in the process.
I suggest some reading on htaccess in idividual folders and how the directives work downward in folder structure from that point rather than upwards.
It is also urgent that you leave the old folder structure in tact creating blank replacement pages as well. Perhaps not blank. Do a search on 301, 302 and 410 looking at some pages that have been created specifically for the "blank replacement pages" I previuosly suggestd.
When creating your redirects have the blank pages in place and from your root folder htaccess create the redirects and the transition will go smoothly.
Hope this helps?
I have noticed also that the few pages that are closer to the root, like in root/somepage.html, the PR is higher.The point in moving the html files out of the folders (leaving only the images inside), is to distribute PR more efficiently.
From above:
Search engines do not care how deep your pages are in your directory structure. Your server uses file paths, but the Web uses URLs. Therefore, it is the length of the click-path that matters, not the directory structure on your server. Search engines will follow the links from one page to the next, and do not care what the URL actually is. One click deep on your site is better than two clicks deep on your site, but the length of the file names (within reason) doesn't matter to search engines as far as page ranking goes.
I don't want to start an argument here, but I believe your will find that your PR has nothing to do with your directory structure, and everything to do with your site's link structure, both internally and from incoming links from other sites. Therefore, I question the need for this exercise.
If you want to pass more PR down, add more links from high-PR pages linking to the low-PR pages. If you want to keep more of the PR on higher PR pages, then add links from the low-PR pages linking to the high-PR pages. This has nothing to do with how your files are stored on your server. As I stated in my first post, URLs and server file paths need not have any relationship whatsoever (you could use URL rewriting to totally scramble the filepaths so that they have no features in common with the URLs if you really wanted to, and the PR of those pages would not change).
However, if you really want to move these pages, here are some answers. You can indeed use separate .htaccess files in each subdirectory if you want to, but I agree with wilderness that it would be easier for you to handle the job by using a single .htaccess file in root. If you redirect from a lower-level directory to a higher-level directory, you will have to take steps to prevent recursion in the URL rewriting process.
The files need not be duplicated or replaced, except that it may make the process of "moving" them more seamless for visitors who are on your site while the move is taking place. The process would be: Copy the pages to their new locations, change the .htaccess file to rewrite the old URLs to the new URLs, and then delete the old pages.
A typical entry to rewrite the URLs in your top-level directory .htaccess would be:
RewriteRule ^old/path/to/subfolder/page\.html$ /new/path/to/page.html [R=301,L]
This Introduction to mod_rewrite [webmasterworld.com] thread may come in handy if you decide to go ahead with this.
HTH,
Jim
I will perform a small test in just a few folders and see how that goes in the coming updates, since this is not urgent. If no changes in PR (everything else remaining equal) then, link structure runs independently of file architecture, as stated by Jim. I'll come back to this thread in the next few months and inform on the results.
Thanks again.
It's not an easily-titled or searched-for subject but here is one other thread [webmasterworld.com] I found.
Jim
This is not something that you need to prove empirically. It just follows from URI and FS name spaces being two separate entities and from the fact that only the URI name space is exposed to the outside. Thus this knowledge is a priori. An empirical test cannot serve to prove or refute this.
Andreas
Another site I manage, which has a flat architecture (homepage and all HTML files located within the same directory) is a representation of this. Some "inner" pages are PR2 even when the homepage is PR5. Those files happen to be 3 clicks away from the home page...This means that instead of moving files around in my other site I will have to re-link pages in a different manner.