I am trying to organize my site by placing certain pages into folders. Many of these pages currently are ranked very high in google

Right now my pages read ... mywebsite.com/pagename.htm

I want to change it to ... mywebsite.com/foldername/pagename.htm

By extending this root, do I risk losing my page rank? Also does google have a preference for shorter root names?

Thanks, Jim

Dani AI

Generated

Moving pages into a folder changes the URLs, so the real risk isn’t the folder name itself but how you handle the URL change. is correct that permanent redirects preserve most signals — but to avoid rankings slipping you need a careful, hands‑on migration plan rather than a bulk rename and hope.

Practical checklist

  • Create a one‑to‑one map of old -> new URLs (for example, /pagename.htm -> /foldername/pagename.htm).
  • Implement 1:1 permanent (301) redirects for every old URL and keep them live long term. Avoid redirect chains and loops.
  • Update all internal links and navigation to point to the new URLs so crawlers stop relying on redirects.
  • Update and resubmit your XML sitemap and use URL Inspection in Google Search Console to request reindexing. Note: the Search Console "Change of Address" is for domain moves, not path changes.
  • Where practical, ask high‑value external sites to update their links to the new URLs (this speeds recovery).

Quick examples (adapt to your stack)

# Apache (.htaccess) single URL
Redirect 301 /pagename.htm /foldername/pagename.htm
# Nginx inside server block
location = /pagename.htm { return 301 /foldername/pagename.htm; }
# PHP (if using script)
header("HTTP/1.1 301 Moved Permanently");
header("Location: /foldername/pagename.htm");
exit;

Testing and expectations

  • Test with curl -I or Search Console to confirm 301 responses.
  • Expect a short dip while Google reprocesses links; full recovery can take days to weeks depending on crawl rate and backlink profile.
  • Keep redirects in place indefinitely or until all inbound links have been updated.

For official guidance see Google on redirects and site moves: and .

Recommended Answers

All 3 Replies

Putting pages into folders should have very little, if any, impact on rankings. There is some evidence that pages within many levels of folders are given less weight than pages in top level folders, but the difference is slight, if any, and I've never seen any difference for just one or two folder levels.
You can actually get a benefit from using folders if the folder name includes a common keyword. This won't increase rankings much if at all, but in search results keywords in the URL are in bold type, making your listing stand out more and increasing click-through.
Your main concern here is changing the URL of pages that you say are now ranking well. If you put these pages into folders, you will lose rankings right away, since you lose the history of the page by changing the URL.
You can minimize the impact of this by using a 301 redirect from all old pages to the new equivalent. With this method, you will see a short dip in rankings but a fairly quick recovery.

What method do you use to setup a 301 redirect from the old url to the new url?

Implementing a 301 redirect depends on your web server technology. There are a number of options.

At a basic level, you can use either:
1) Web server commands (usually IIS or Apache), or
2) Server side scripting (usually, PHP, .NET, ASP, JSP, etc).

For some notes on server side redirects, see

For scripting, you need to look at the specific commands available for each language. For some notes on that, see http://www.somacon.com/p145.php

Remember you should redirect each and every old URL to the new one. This can be tedious, but will help reserve your rankings.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.