GamingPH.com

How to Fixed WordPress 404 Error in all Pages except Homepage in Godaddy

After migrating from Linux server to Windows server, I was surprised that all of my inner pages on my wordpress sites turns to 404 Page Not Found except for my homepage that are fully functional. After figuring out the problem, the cause of the 404 Error is that my server is not recognizing the .htaccess file or Mod Rewrite is not working.

404-not-found-on-godaddy

The solution to this problem is by creating an alternative rewrite file named web.config, see my full instruction below.

How to Fixed WordPress 404 Error Page Not found in all Pages except Homepage in Godaddy Server.

  1. Create a file then named it to web.config and copy the content below.
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    <system.webServer>
    <rewrite>
    <rules>
    <rule name="WordPress: https://noodtv.com/gensanblog.com" patternSyntax="Wildcard">
    <match url="*"/>
    <conditions>
    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
    </conditions>
    <action type="Rewrite" url="index.php"/>
    </rule></rules>
    </rewrite>
    <staticContent>
    <clientCache cacheControlMaxAge="14.00:00:00" cacheControlMode="UseMaxAge"/>
    </staticContent><urlCompression doDynamicCompression="true" dynamicCompressionBeforeCache="true"/><caching>
    <profiles>
    <add extension=".jpg" policy="CacheForTimePeriod" duration="00:01:00" varyByHeaders="Accept-Language"/>
    <add extension=".css" policy="CacheForTimePeriod" duration="00:01:00" varyByHeaders="Accept-Language"/>
    <add extension=".js" policy="CacheForTimePeriod" duration="00:01:00" varyByHeaders="Accept-Language"/>
    <add extension=".jpeg" policy="CacheForTimePeriod" duration="00:01:00" varyByHeaders="Accept-Language"/>
    <add extension=".gif" policy="CacheForTimePeriod" duration="00:01:00" varyByHeaders="Accept-Language"/>
    <add extension=".png" policy="CacheForTimePeriod" duration="00:01:00" varyByHeaders="Accept-Language"/>
    <add extension=".ico" policy="CacheForTimePeriod" duration="00:01:00" varyByHeaders="Accept-Language"/>
    </profiles>
    </caching></system.webServer>
    </configuration>
  2. Upload web.config to the root directory of your wordpress site. You can use FTP or file manager from your GoDaddy Hosting Dashboard to upload this file.
  3. Check your wordpress site and see if its working now.

If you still having issue with your site just leave comment below.

Exit mobile version