Is it harmful to make changes to a subdirectory address? For example change mydomain.com/jh87gj8h.html to something more relevant such as mydomain.com/relevant-address.html I made such changes and updated the google sitemap, but the search engine still gives the old address which obviously has a dead link. Is it better to keep the old addresses even though they don't mean anything or is there another way to solve this?
IMO, if you change a page's location, you at the minimum need to 301 redirect (permanent) your old page address to the new address.
Redirect is the best way to go. You can also do some url rewriting and you wouldn't have to even change the html file names
Otherwise how long does it take Google to fix this? Surely they don't keep dead links for too long. I submitted the new sitemap some weeks ago. I have changed a lot of pages, so I guess it would take a lot of time to redirect all of them.Perhaps I should keep both sets of pages until the new ones get indexed, but this would mean duplicate pages. Would that be a disadvantage?
If your running an apache server you can use your htaccess file to do your redirections, please review the below article. http://webmaster.iu.edu/tool_guide_info/redirect.shtml
I am not using apache myself. I don't know what my server is using. It seems that redirecting would have been good if I had not already deleted the old files. If I am not mistaken I need to create a redirect file and save it as the old file. How long will it take google to replace the old files with the new files in its search results?
What are you as server-side language? If e.g. PHP, ASP etc. you can write code that outputs the necessary HTTP headers. .htaccess (and optionally also using mod_rewrite) is an easy way to redirect a lot of pages, but if you do not have that... I suggest you ask your webhost if they know what you can do. If you really can't redirect, I suggest you create some minimal pages to replace the deleted ones, each with a link to the new address.
First, set up a 301 redirect from the old name to the new name. Then update all references to the old page name within your pages and your sitemap(s). Finally, add a Disallow statement to your robots.txt which points to the old name. Example: 1. Set up a 301 redirect from /jh87gj8h.html to /relevant-address.html 2. Within your pages and sitemaps, change the href's from /jh87gj8h.html to /relevant-address.html 3. In your robots.txt, add the following line: Disallow: /jh87gj8h.html I think Google hangs on to the old address a little longer if you don't use a Disallow statement in robots.txt to nudge them in the right direction.