WordPress is often used to create weblog posts and pages on your web site. Nonetheless, some customers might have so as to add a separate static HTML web page and make it accessible together with their basic WordPress web site.
The issue is that this web page is just not acknowledged by WordPress, and it might present a 404 error.
On this article, we are going to present you tips on how to correctly add an HTML web page to WordPress with out inflicting a 404 error.
Why Add HTML Pages to WordPress?
WordPress comes with a built-in content material sort so as to add pages to your web site. Typically, WordPress themes add pre-designed web page templates to show your pages.
There are even WordPress touchdown web page plugins that mean you can create lovely web page templates with a drag-and-drop builder.
Which means that, typically, you shouldn’t must add an HTML web page to your WordPress web site.
Skilled Tip: We advocate utilizing SeedProd, the very best WordPress web page builder plugin, to design customized pages. You should use its drag-and-drop interface to design your touchdown web page. Plus, it comes with professionally designed templates to make use of as beginning factors.
Nonetheless, generally, you could have static HTML pages out of your outdated web site or a static template that you just like and wish to use.
In these eventualities, you have to to add your HTML web page to WordPress.
Since WordPress comes with its personal Website positioning-friendly URL construction, it might trigger a 404 error in case you merely add your HTML web page and attempt to entry it.
That being stated, let’s take a look at tips on how to add an HTML web page to your WordPress web site with out inflicting 404 errors.
Importing HTML Web page to WordPress Website
First, it’s essential to put together the HTML web page that you just wish to add.
If it’s a single HTML web page with no separate CSS or picture recordsdata, then you may go forward and add it as is.
Nonetheless, if the web page you wish to add has separate CSS recordsdata and pictures, then it’s essential to place them in a listing construction.
Ideally, you’ll wish to place your recordsdata in a folder in your laptop.
Don’t neglect to open your fundamental HTML file to ensure that every little thing works as anticipated.
Subsequent, it’s essential to connect with your WordPress web site utilizing an FTP consumer or the File Supervisor app in your internet hosting account management panel.
After that, it’s essential to add the folder you created earlier to the foundation folder of your WordPress web site. The basis folder is the one which has the wp-admin, wp-content, and wp-includes folders inside it.
After importing your recordsdata, you may go to your web site to view your HTML web page.
When you uploaded the folder with HTML and accompanying CSS and picture recordsdata, then you have to so as to add the identify of the folder you uploaded to the top of your web site deal with, like this:
https://instance.com/landing-page/
Be aware: The principle HTML file in your folder must be known as index.html. In any other case, you’ll have to present the identify of the HTML file, too.
Then again, in case you uploaded a standalone HTML file, then merely add the HTML filename to the top of your web site deal with:
https://instance.com/landing-page.html
You’ll now see your uploaded HTML web page.
When you run into an error web page, then you have to to troubleshoot the error.
Troubleshooting HTML Web page Add in WordPress
Usually, it is best to have the ability to view your HTML web page by visiting the web page or folder straight.
Nonetheless, as a result of rewrite guidelines utilized by WordPress or your internet server, there’s a probability that you could be run into some frequent WordPress errors.
1. Fixing 404 Error After HTML Web page Add in WordPress
The 404 error is without doubt one of the commonest WordPress errors. Nonetheless, it’s fairly simple to repair typically.
If you’re seeing a 404 error after importing your HTML web page, then you definitely simply want so as to add a rewrite rule to your .htaccess file:
2. Fixing 403 Error After Importing an HTML Web page in WordPress
A 403 error may happen on account of file permissions in your newly uploaded HTML web page or the folder that you just uploaded.
Merely connect with your web site utilizing an FTP consumer and click on to pick out the HTML web page or the folder you uploaded.
Subsequent, right-click after which choose the ‘File permissions’ possibility in your FTP consumer.
It will deliver up a file permission popup. Enter ‘755’ into the numeric worth area and examine the ‘Recurse into subdirectories’ possibility.
Under that, choose the ‘Apply to all recordsdata and listing’ possibility and click on on the ‘OK’ button.
It will set the file permissions on your HTML add folder and all of the recordsdata and folders inside it.
For extra particulars, see our tutorial on tips on how to repair file and folder permissions error in WordPress.
Including Your Customized HTML Web page to XML Sitemaps
Now that you’ve got uploaded your HTML web page, it’s time to let serps know that it’s a part of your web site.
The best method to do this is by including it to the XML sitemaps on your web site.
When you haven’t arrange sitemaps but, then comply with the directions in our article on tips on how to add XML sitemaps in WordPress.
First, you’ll want to put in and activate the All in One Website positioning for WordPress plugin. For extra particulars, see our article on tips on how to set up a WordPress plugin.
Upon activation, go to the All in One Website positioning » Sitemaps web page. Beneath the Basic Settings web page, ensure that the ‘Allow Sitemap’ toggle is turned on.
After that, scroll down somewhat to the Extra Pages part.
Slide the toggle to activate this part after which enter your HTML web page or folder URL below the ‘Web page URL’ possibility.
Click on on the ‘Add Web page’ button so as to add it.
After that, don’t neglect to click on on the ‘Save Adjustments’ button to retailer your settings.
All in One Website positioning will now embody your customized HTML web page URL in your WordPress XML sitemaps. Search engines like google will have the ability to discover the URL and deal with it as some other web page out of your web site.
We hope this text helped you learn to add an HTML web page to WordPress with out inflicting errors. You may additionally wish to see our WordPress Website positioning information to get extra visitors or check out our newbie’s information to WordPress velocity and efficiency.
When you preferred this text, then please subscribe to our YouTube Channel for WordPress video tutorials. You may as well discover us on Twitter and Fb.