Showing results for 
Show  only  | Search instead for 
Did you mean: 

Changed site address and landed up with a .htaccess file issue

I am not a coder/developer


I Had Made a change to the website url(site address in wordpress general settings)

was checking robots.txt and sitemap.xml for SEO audit and found 404 errors(was showing rightly till this day)


did some reading and found that it was because of the change in address and i had to got to wordpress - setting - permalinks section and click on save changes without changing anything.

tried saving in permalink folder in wordpress settings(without changing anything).


Instead found a message that i need to update my .htaccess file and also a code (mod_rewrite rules) to copy and paste


logged in to Godaddy(hosting provider) and in Cpanel and and opened file manager(root document) ;

found the .htaccess file, selected it and clicked edit(just edit not code editor)


found the script with the similar code, but on the - RewriteBase and RewriteRule . lines, only / was present instead of the additional text i added to my url(to make it SEO friendly)


I replaced this old code with the new one that i got from wordpress in the permalinks section.

The permalink section was still asking for updating .htaccess

i went to Cpanel - file manager - .htaccess - edit , again


i saw the change in the space between

but in between the tags # BEGIN WordPress and # END WordPress tags , their was a second code,the same old code that i had replace with the modified url in it.


i am not sure if that was there the first time. So too similar codes now, one new(that i replaced) and one at the end(the old version).

i replaced that with the new too.

still the problem is there.


Moreover , now when i checked my site for robots.txt and sitemap.xml , it says that there is an INTERNAL SERVER ERROR


what do i do now, i think i made a mistake in copying the code. Also, the change to the url was made to site address and not wordpress address.

Super User II



I noticed that you've not yet received a response.   When stuff like that happens, with all those steps, it's hard for us who cannot see what you did or your files or setup to know exactly what to advise. 


Did you resolve your issue?  If so can you share what the problem ended up being and what the solution was?  I know others would probably be interested as well.


If not resolved, from what I can tell this started with 404s, right?  If that's the case, if there was a default .htaccess that really didn't need to be modified (unless you had modified it previously).  


Whenever there is a URL change, 404s are common as the search engines figure out that the old URL no longer exists.


There is a great redirection plugin you can use that allows you to redirect each 404 to the most appropriate page on the new URL without having to touch any core files and offer the most user friendly experience possible. Maybe check that out?


HTH! 😉


"I never lose. Either I win or I learn." ~ Me