Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
1.7k views
in Q2A Core by
I can't figure this out....

Google is indexing my domain and multiple "pages" on the domain, but the actual question doesn't appear in many of the urls..

For example,

domain.com, domains.com/tags/, domain.com/categories/, /ask/, /unasnwered/ etc. are all indexed.  Even domain.com/ask/QUESTION_NUMBER/ is indexed....

However,

domain.com/QUESTION-NUMBER/what-is-a-car  or domain.com/QUESTION-NUMBER/why-is-the-sky-blue is not indexed.

After looking at the 260 pages that Google Indexed, only 3 question URLs are listed.  (To be fair, the site is only 2 weeks old, has no incoming links, and only 18 questions)

So, I'm just wondering if as the site grows will Google index the full question URL, or is this a problem with question2answer?

Your help is appreciated, thanks!

1 Answer

+2 votes
by
Dont worry, if Your site is only 2 weeks old, you can be happy that at least something is added.

One of my sites is now 2 months old, has some forced incoming links and about 80% of the questions are indexed by google.

Just wait and get some incoming links. Then, you either may add Your feed as sitemap in googe webmastertools or you can add Simon Frerichs sitemap generator for question2answers, what as well works.

But really, if Your mainpage has a Pagerank of 0 to 1 why should the questions already be indexed.
by
Thanks for responding.  (I'm the one who asked the question)

What's funny is google has indexed several of my questions / question pages, but it's not indexing the correct url.

For example, if the questions is "What is an elephant?" - The page title is correct, the anchor text is correct, but the URL google has indexed is domain.com/59/ask

Is there a way to force google to make index the URL domain.com/59/what-is-an-elephant?

Is this normal behavior for q2a?

Thanks again!
by
I am not sure about that.

May be it has something to do with the htaccess
In Admin / General in my case the first option is used for url rename

and

Do You have a questionbox on You question sites ?

domain.com/59/ask in my opinion does not exist and I cant repeat this problem as none of my inks on a question sites leads to domain/number/ask

If You have changed Your advanced theme, this error could be resut of a changed ink url like ./ (point slash) instead of / (sleash)

regards monk
To see the google indexed structure of other sites just make a search for ex. this sites domainname and the indexed sites sho up.
by
Thanks again for the reply.

I also use the admin / general first option for rewrite access.  As for questionbox, I have only a search box on every page and have the ask on its own page.

I tried out the google search using site:domain.com - I noticed for yours,  all of your questions have the "full url" such as:

http://www.questions.com.mx/15/can-enyone-help-me-with-my-homework

But, going to: http://www.questions.com.mx/15/ask  still yields the same page.

For my domain, only 5 of 18 questions have the "correct url" - I'm guessing that if I create/use the sitemap attachment it may fix it.  Also, the site is so new that perhaps these URLs were grabbed in the sites very early stages.

I have made some advanced modifications to the theme files so will double check all the code.

Taking a quick glance at the code (html output) I noticed that Q2A makes all navigation links (and others) ./pagename on the root or single level pages and ../pagename on question pages.

I purposely made my custom links /pagename (without the dot), is this wrong?
by
I think I figured it out!  I just did a search on Google and looked at the cache version of the page.  (Which was from September 16th) - On that page, I had the custom links which use the URL w/ a dot  (./ask or ./unanswered) -

So, on the page domain.com/NUMBER/what-is-a-car  the Q2A default links take you to domain.com, domain.com/tags, domain.com/categories, etc. - but my custom link links you to domain.com/NUMBER/ask

So to sum it all up, when creating "hard coded" links in a advanced theme use /pagename (w/o any dots) - I'm a little suprised that w/ no incoming links and not telling anyone the url (yet) that Google found the site and started indexing.  Moving forward, I'll be sure to check what date the cache was created.

Wwould you know how to tell Google to remove those pages from its memory and re-scan?
by
My question box which I am using on main uses /ASK/

see here:


'<FORM METHOD="POST" ACTION="/ask/">
<table class="qa-form-tall-table">
<tbody>
<tr><td class="qa-form-tall-label" colspan="2">¿Cual es tu pregunta?</td>
</tr>.............

this for me works. Now, as You have it on other sites as well You may have to check ./ ../ or just /

To make a trial, visit Your site, enter Your box, and see to which direction it leads You, However, You as well can use the full http://domain/ask
to be sure.

As well, there was a post about a questionbox in the sidebar / sidepanel, there was an code example as well (the oldest posts of this)

I am sure that this error is related to the ./ or ../ issue because google found this directions on Your site. As well it may be that You fixed it already and it is as You told an older result. However, You have to fix it soon as this may cause infinite domain directions with the same content...

and do not just see the html code, as the script rewrites the code you shoud see what You have in qa-theme.php

But, going to: http://www.questions.com.mx/15/ask  still yields the same page. is correctly redirected to But, going to: http://www.questions.com.mx/15/

but there You see the probem, if You get there through links on Your site, ghoogle does the same and indexes this site with / ask at the end as duplicate, and won´t index too much of my site...
by
Removing the bad sites:

Upload a robots.txt and inform google on webmastertools dening access to some sites..

You as wel can set 301 redirects in the htaccess, redirecting the bad sites, but this may become complicated..

Edit:

Than, You as wel can google tell to delete several sites, You shoud do so as well, but this wil need some weeks..
by
So, I edited the end of .htaccess with this entry:

redirect 301 /25/ask http://www.domain.com/25/what-is-a-cat

However, when clicking or going to domain.com/25/ask, I'm redirected to:

http://domain.com/25/what-is-a-cat/?qa-rewrite=25/ask

My question...  Why is .htaccess adding ?QA-REWRITE=25/ask to the end of the URL and how do I remove that from these "hard coded 301 redirect settings?"
...