How to Upload an HTML Page to WordPress Without 404 Errors

0
13

WordPress is often used to create weblog posts and pages in your web site. However, some customers may have to add a separate static HTML web page and make it accessible together with their normal WordPress web site.

The downside is that this web page shouldn’t be acknowledged by WordPress, and it might present a 404 error.

In this text, we’ll present you the way to correctly add an HTML web page to WordPress with out inflicting a 404 error.

How to upload an HTML page to WordPressHow to upload an HTML page to WordPress

Why Upload HTML Pages to WordPress?

WordPress comes with a built-in content type to add pages to your web site. Often, WordPress themes add pre-designed web page templates to show your pages.

There are even WordPress landing page plugins that permit you to create stunning web page templates with a drag-and-drop builder.

This implies that, normally, you shouldn’t want to add an HTML web page to your WordPress web site.

Expert Tip: We advocate utilizing SeedProd, the perfect WordPress web page builder plugin, to design customized pages. You can use its drag-and-drop interface to design your landing page. Plus, it comes with professionally designed templates to use as beginning factors.

SeedProd page builderSeedProd page builder

However, typically, you’ll have static HTML pages out of your previous web site or a static template that you just like and wish to use.

In these eventualities, you will have to add your HTML web page to WordPress.

Since WordPress comes with its personal SEO-friendly URL structure, it might trigger a 404 error for those who merely add your HTML web page and take a look at to entry it.

That being stated, let’s take a look at how to add an HTML web page to your WordPress web site with out inflicting 404 errors.

Uploading HTML Page to WordPress Site

First, you want to put together the HTML web page that you really want to add.

If it’s a single HTML web page with no separate CSS or picture information, then you may go forward and add it as is.

However, if the web page you need to add has separate CSS information and pictures, then you definately want to place them in a listing construction.

Ideally, you’ll need to place your information in a folder in your laptop.

Arrange HTML pageArrange HTML page

Don’t neglect to open your predominant HTML file to be sure that every part works as anticipated.

Next, you want to join to your WordPress web site using an FTP client or the File Manager app in your internet hosting account management panel.

After that, you want to add the folder you created earlier to the foundation folder of your WordPress web site. The root folder is the one which has the wp-admin, wp-content, and wp-includes folders inside it.

Upload filesUpload files

After importing your information, you may go to your web site to view your HTML web page.

If you uploaded the folder with HTML and accompanying CSS and picture information, then you will have to add the identify of the folder you uploaded to the top of your web site tackle, like this:

https://instance.com/landing-page/

Note: The predominant HTML file in your folder must be referred to as index.html. Otherwise, you’ll have to present the identify of the HTML file, too.

On the opposite hand, for those who uploaded a standalone HTML file, then merely add the HTML filename to the top of your web site tackle:

https://instance.com/landing-page.html

You will now see your uploaded HTML web page.

If you run into an error web page, then you will have to troubleshoot the error.

Troubleshooting HTML Page Upload in WordPress

Normally, you need to be in a position to view your HTML web page by visiting the web page or folder immediately.

However, due to the rewrite guidelines utilized by WordPress or your internet server, there’s a probability that you could be run into some common WordPress errors.

1. Fixing 404 Error After HTML Page Upload in WordPress

The 404 error is without doubt one of the commonest WordPress errors. However, it’s fairly simple to repair normally.

If you’re seeing a 404 error after importing your HTML web page, then you definately simply want to add a rewrite rule to your .htaccess file:

RewriteRule ^(.*)index.(php|html?)$ /$1 [R=301,NC,L]

2. Fixing 403 Error After Uploading an HTML Page in WordPress

A 403 error may happen due to file permissions in your newly uploaded HTML web page or the folder that you just uploaded.

Simply join to your web site utilizing an FTP shopper and click on to choose the HTML web page or the folder you uploaded.

Next, right-click after which choose the ‘File permissions’ possibility in your FTP shopper.

Open file permissionsOpen file permissions

This will convey up a file permission popup. Enter ‘755’ into the numeric worth subject and examine the ‘Recurse into subdirectories’ possibility.

Below that, choose the ‘Apply to all files and directory’ possibility and click on on the ‘OK’ button.

File permissions checkboxFile permissions checkbox

This will set the file permissions in your HTML add folder and all of the information and folders inside it.

For extra particulars, see our tutorial on how to fix file and folder permissions error in WordPress.

Adding Your Custom HTML Page to XML Sitemaps

Now that you’ve got uploaded your HTML web page, it’s time to let search engines like google and yahoo know that it’s a part of your web site.

The easiest method to do that’s by including it to the XML sitemaps in your web site.

If you haven’t arrange sitemaps but, then comply with the directions in our article on how to add XML sitemaps in WordPress.

First, you’ll want to set up and activate the All in One SEO for WordPress plugin. For extra particulars, see our article on how to install a WordPress plugin.

Upon activation, go to the All in One website positioning » Sitemaps web page. Under the General Settings web page, be sure that the ‘Enable Sitemap’ toggle is turned on.

AIOSEO sitemapsAIOSEO sitemaps

After that, scroll down a bit to the Additional Pages part.

Slide the toggle to activate this part after which enter your HTML web page or folder URL underneath the ‘Page URL’ possibility.

Add page URLAdd page URL

Click on the ‘Add Page’ button to add it.

After that, don’t neglect to click on on the ‘Save Changes’ button to retailer your settings.

All in One website positioning will now embrace your customized HTML web page URL in your WordPress XML sitemaps. Search engines will likely be in a position 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 the way to add an HTML web page to WordPress with out inflicting errors. You may need to see our WordPress SEO guide to get extra site visitors or check out our newbie’s information to WordPress speed and performance.

If you favored this text, then please subscribe to our YouTube Channel for WordPress video tutorials. You also can discover us on Twitter and Facebook.



Source link