Sitemap - Wordpress site on subdomain - html

I'm trying to get a definite answer regarding the issue. I have an html website which contains a WordPress blog under it in a subdomain as a folder.
I currently have site map on both the html site and the blog itself. Is that the way to go ? I have also noticed that the sitemap on the html site doesn't include any of my pages/posts from the blog, should it include them as well?

Having two sitemaps for the root and subdomain is perfectly fine and acceptable. Don't forget to submit them to search engines, or include them in your robots.txt file if you have one.

As the methode said, this is perfectly fine and acceptable. All you have to do is just add the in your robots.txt file so that search engines can crawl your html site as well as blog.
First of all create a new robots.txt (if not created earlier) in root / home /www foler of your website and add the following two lines by replacing them with your site related values
sitemap: http://<www.yoursite.com>/<path_to_your_html_sitemap>.xml
sitemap: http://<www.yoursite.com>/<path_to_your_blog_sitemap>.xml

Related

Default localized index.html for pelican

I tried to find something that is similar to my problem, but I did not have success.
I'm using pelican to build a static multilanguage website and I'll use github pages to publish the content.
Being a multilanguage site (en as default) I decided to structure the output folder with separated folder for each language and use relative url to point to templates etc.. all works smoothly enough.
Just to make a first github page publish experience I used ghp-import and again all is working properly except for one little thing.
Also in localhost:8000 the default homepage, all the other pages, etc have the language tag in the url, like:
localhost:8000/en/blog
localhost:8000/it/blog
the problem is that the default homepage is:
localhost:8000 (for localhost obviously)
username.github.io (for github pages)
by landing on this page, the templates fails to load (again they are lang specific) and ever worst, all the link are broken because they do not point to any language (localhost:8000/blog does not exist)
What I would like to do is to make a redirection so that, when typing username.github.io will redirect to username.github.io/en
I did not find something suitable in the pelicanconf.py file..
is it possible?
Thanks!
Try changing your SITEURL in pelicanconf to 'username.github.io/en'
That should work but the address 'username.github.io' won't work anymore.

failed to load resource hexo.js

I'm using HexoJS to create a blog. I was able to generate the static files using hexo generate. Even though there are css files and JS files generated, they are not properly linked to the index.html.
So, I have to open each html page and correct each page links given in href and src attributes one by one. I believe that this is not very practical. Can anyone help ?
The localhost is used for preview the website. When we publish our blog, it should be on a server, then the path will be interpreted correctly, we don't need to change any thing. What we saw on http://localhost:4000 will be same when you published your website.
So, we don't have to worry about the broken paths in the public folder.

Having html and wordpress on the same directory

I have a WordPress site with a couple of posts on it. To this site I need to add a few HTML pages (including index.html). I need both of them to work properly.
The home page should be the index.html page, and all its links(HTML pages).
The previous site URL's i.e. WordPress URL's should also work.
I put them together and the index.html page displays as home page, the subpages(HTML) also work fine. Although all WordPress URL's are re-directing to the index.html itself.
Is this possible? How do I make the old WordPress URL's work fine (i.e. not redirect the index.html page)?
When dealing with issues like this, I like to create page templates in Wordpress (with page names like About, Projects, etc.) And then I create a .php file using the slug title of it (so a projects page will correspond to a .php file called 'page-projects.php'
One example being I make a page called 'about', then I create 'page-about.php' in my Wordpress directory. The Wordpress Template Hierarchy will, along the way, look for a .php file called 'page-about.php'
A solution like this is great because those pages are linked through your site, so using /about or /projects will bring you to the proper pages instead of redirecting to the main page (because it redirects to your index when Wordpress can't find any other suitable template to display)

Static HTML page that links to current Wordpress blog

So, I currently have a WP blog installed. What I want to do is put a static HTML landing page at the root of the site and then a link to the blog. The HTML landing page does not look similar in theme and everything is hosted under the same domain.
How can I do this with this current structure?
I suppose I would have to somehow move the blog to /blog instead of the root?
Thanks.
Depending on what server you're running, you might not need to do anything. Certain servers, like Apache, have a DirectoryIndex which gives priority to .html files by default. So even if you had index.html and index.php in the same folder, it would load the index.html file.
You could also define the priority in an htaccess file or use the commenter above's suggestion of pasting the HTML into the index.php template and then making a "home" template and telling Wordpress to use that specific page as the homepage.
That being said, I would strongly recommend installing Wordpress in a sub-directory, such as "/blog" as you mentioned. Just as a fail-safe.

External HTML page and wordpress in same root folder

I got a quick question:
I have a HTML page and my wordpress blog in the root folder due to some technical integration's used in it. What I have done to achieve this:
I simply saved my HTML page as "index.html" and put in the root folder that holds the Wordpress "index.php" file. The "index.html" automatically was granted a higher status and opened as my home page.
My question:
How this affects my SEO?
How my sitemap is affected by that?
Since I use SEO plugin by Yoast, this plugin builds my sitemap but I am not sure that it will include my homepage.
I am opened to your interactions and suggestions.
Thanks in advance.