Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+9 votes
1.3k views
in Q2A Core by
I created a question and answer site, but I do not know how to add it in Google Console. What do I need, how can I create a map for the site and where it is placed in the hosting? I hope for a clear answer
by
My url structure is https://mywebsite.net/
Iam using c panel
by
*sigh*

Please log into your Q2A site as the admin user. Go to "Administration center > General". Roughly halfway down that page is a section "URL structure" with 5 radio buttons. Which of those did you select?

CPanel is a server administration tool, not a web server. But since it's CPanel you're most likely running Apache.
by
The question is a little bit too broad to understand, but I believe this may be a duplicate of:
https://question2answer.org/qa/89075/where-the-sitemap-xml

As @AnsgarWiechers was trying to explain to you earlier, there is already a sitemap generated. But the absolute URL path to it will depend on what URL structure you have set on the Q2A: Admin > General > URL structure

See this answer for more:
https://question2answer.org/qa/89075/where-the-sitemap-xml?show=89083#a89083
by
Iam using number three structure

1 Answer

0 votes
by

Log into your Q2A site as the admin user and go to Administration center → Plugins. Find the entry "XML Sitemap" at the bottom of that page and make sure the plugin is enabled. In the plugin options configure what you want included in the sitemap (I recommend excluding user pages and categories, but that's up to you).

Since you're using the third URL structure (/?qa=123/why-do-birds-sing), the sitemap should be accessible as

https://example.com/?qa=sitemap.xml

Replace "example.com" with your actual domain.

Then edit the the file robots.txt in your Q2A install directory (the folder where index.php and qa-config.php are located) and add the following line (if it doesn't exist already):

Sitemap: https://example.com/?qa=sitemap.xml

Again, replace "example.com" with your actual domain.


If you want the sitemap to be available like this (without changing the Q2A URL structure)

https://example.com/sitemap.xml

you need to rewrite the URL in your webserver. For Apache that would probably look like this:

<Location "/sitemap.xml">
    RewriteEngine on
    RewriteCond "%{REQUEST_URI}" "^/sitemap\.xml$" [NC]
    RewriteRule "^/sitemap\.xml$" "/?qa=sitemap.xml" [NC]
</location>

Also change the URL in robots.txt accordingly.


If your site becomes too large for a single sitemap (50000 entries), this enhanced version of the sitemap plugin might help. I haven't used it myself, though, so take with a grain of salt.

by
Then your sitemap is already enabled and working.

What does not seem to be working is the URL https://example.com/sitemap.xml (which is nice to have, but not required AFAICS). That path does not exist on your server, because you're using the 3rd URL scheme, not the 1st one. To make it work your web server must rewrite the path "/sitemap.xml" to the actual path "/?qa=sitemap.xml". This is already explained in my answer.

If you don't understand how to configure URL rewriting: please hire someone who has experience in operating a web server.
by
I am very frustrated..it did not work for me..i want a request from you..explain to me how I can add my site to google console and archive the questions
by
I don't use Google's search console, so I can't help you there. Sorry.
by
(excluding user pages and categories) No choice categories

excluding user pages and categories

Or

Include category browser
...