why I cannot write sitemap in robots.txt - sitemap

I have two question
1,when I write Sitemap: https://www.example.com/sitemap.xmlin the file robots.txt,the url part show red,it seems to tell me there is wrong.but my sitemap url is all right,so I do not know why
2,I use wordpress to build my site .but after I install woocommerce,the shop page will have a "index.php" on the url ,it is like this: www.example.com/index.php/shop,and my sitemap url also have that :www.example.com/index.php/sitemap_index.xml,the sitemap can be open ,but shoul I need to figure out a way to get rid of the"index.php" part?

Related

How do I set a redirect for my root index.html in jekyll?

I have jekyll-redirect-from plugin, but it only really works for pages that aren't my root homepage.
For example, if a user types in www.mywebsite.com/index.html I want it to redirect and display the URL as www.mywebsite.com
Everything I can find about this is focused on blog posts and other pages than the index. Has anyone had this issue?
You don't need a redirect, because www.mywebsite.com/index.html and www.mywebsite.com are the same page. (The browser just shows the index file by default if you go to www.mywebsite.com.)
You need the browser to rewrite the URL, while remaining on the same page. You need to do this on the webserver.
.htaccess
If your site is on an Apache server and you have access to the server, you can use an .htaccess file to rewrite the URL from www.mywebsite.com/index.html to www.mywebsite.com.
There are online .htaccess generators like this one that help get the syntax right.
There are similar methods for rewriting URLs on nginx webservers.
GitHub Pages
If you're on a service like GitHub Pages, you can't use .htaccess. A free workaround is to use Netlify to deploy your site, because you can set up redirects on Netlify. Create a free account on Netlify and add a new site from GitHub there.
In the root of your repo, create a netlify.toml file containing this:
# Redirect /index.html to /
[[redirects]]
from = "/index.html"
to = "/"
Netlify will now handle that redirect.

Cannot generate sitemap for a site?

I have been trying to generate a sitemap for my site, I have used several 3rd party tools but none of them were successful,They either give an error or doesn't generate a proper sitemap and just show a single line . Here is my site btw: https://www.mightyhealthy.com/
Have you tried with the below url
/catalog/seo_sitemap/category/
it is magento's default sitemap
The url for your store will be as mention below
https://www.mightyhealthy.com/catalog/seo_sitemap/category/

how to create sitemap.xml file in joomla website?

First I created sitemap.xml file for my website and upload this file into the domain root folder of my site and Second I verified my website on webmaster of Google.
But sitemap is not showing on my website. Please give me reason for this.
Sitemap couldn't be displayed from xml file.
You need to install a component to help you create it. A very good one is: Xmap

Joomla .htm url mapping to pages in CMS

I inherited a Joomla site that has a set up I'm not familiar with. The url of pages on the site are like
http://hufboxing.com/about.htm
http://hufboxing.com/training.htm
http://hufboxing.com/schedule.htm
I looked in the .htaccess file and do not see any rules that map .htm urls to the Joomla query string urls.
In the CMs, on each article are url alias. The corresponding URL alias to each of the urls above are:
http://hufboxing.com/about-us
http://hufboxing.com/team-training
http://hufboxing.com/the-gym-schedule
However, going to any of these alias gives a 404 page. Even if I attach a .htm extension to these urls, it gives 404 page.
Where do I go in Joomla to add new pages to the site and add new .htm urls?
Here is the website:
http://www.hufboxing.com
That is normal. They are based on your article and menu aliases. Joomla uses a database to store the text so you won't find pages. How do you want the urls to look? Also what version? To add pages login to administrator and go to create article. Then you may want to go to the menu manager and link. I recommend you review the beginner docs at http://docs.joomla.org.

Is there a way to detect sitemap, if it is not in robots.txt?

I'm working for a simple bot for a project, and I noticed, that a lot of sites do not have sitemaps in their robot.txt files. There is of course an option to simply index the sites in question and crawl all possible pages, but that often takes much more time than simply downloading sitemap.
What is the best way to detect sitemap if it is not mentioned in robots.txt?
Normally it should be placed in the root directory of a domain like xydomain.xyz/sitemap.xml .
I would only add the site map into the robots file, if it is placed elsewhere. If a site uses more than one site map located on another place, it should be noted in an index map.
You can use this online tool to scan your site and create a bespoke sitemap.xlm file for your site.
To help your sitemap to be discovered through the robot.txt add the URL of your sitemap at the very top of your robot.txt file, (see below example).
So, the robots.txt file looks like this:
Sitemap: http://www.example.com/sitemap.xml
User-agent:*
Disallow:

Resources