Moz Q&A is closed.
After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.
Wordpress & trailing slash on domain name
-
Hi recently changed my site so it is based on Wordpress, got my preferred domain set in Google webmaster as
but since moving to wordpress my domain is now having a slash put on the end of it like
Most of the links going to my homepage do not have the slash on the end so am I right in thinking I should get rid of the slash from my site so I have one consistent url?
If so any ideas how to banish the slash? Cannot seem to do it through the Wordpress general settings (despite preferred domain being set as www.domain.co.uk !)
Thanks
T
-
Takeshi, that was great thank you
-
Try this:
<code># BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteRule (.+)/$ $1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] IfModule></code>
-
Think it is a HTAccess issue, just opened it up and I have the following, do I just strip out the trailing slash on
RewriteBase /newsite/ or do I have to strip out a few more?
Don't like messing with my hataccess so any help to point me in the right direction would be great!
# BEGIN WordPress <ifmodule mod_rewrite.c="">RewriteEngine On RewriteBase /newsite/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /newsite/index.php [L]</ifmodule> # END WordPress
-
Good point!
Just checked and www.domain.co.uk redirects to www.domain.co.uk/
This a htaccess issue perhaps?
-
Does www.domain.co.uk redirect to www.domain.co.uk/ or are they treated as separate pages?
-
Self hosted!
I have set it as www.domain.co.uk in the settings but for some reason it is still showing with the slash when I view the site
-
Are you on self hosted Wordpress or wordpress.com? Usually on self hosted you can edit the URL under general options.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Product content length & links within product description
Hello, I have questions regarding content length and links within descriptions. With our ecommerce site, we have thousands of products, each with a unique description. In the product description, I have links to the parent category and grandparent category (if it has one) in the main product text which is generally about 175 words. Then I have a last paragraph that's about 75 words that includes links to our main homepage and our main product catalogue page. Is the content length long enough? I used to use text that was 500 words, and shortening it I still rank when launching new products, so I don't think an increase in text length will have any additional benefit. I do see conflicting information when I do searches, with some people recommending a minimum of 300 words and some saying to try and go a 1000 for category pages. In regards to the links, I noticed a competitor has stopped following this format, so I'm unsure if I should keep going too. Is it too many links to have each of the products link back to the main catalogue and homepage? Is it good to have links with anchor text to the categories a product is in? There are breadcrumbs on the page with these links already. There are already have heaps of links on our pages (footer, and a right sidebar with image links to relevant categories), so my pages do get flagged for too many links. Thanks!
On-Page Optimization | | JustinBSLW0 -
Should we add our company's name in page title tag or not?
We have been adding our company (Townscript) name in all the page titles. For example, in an event page of Lucknow Conclave: www.townscript.com/lucknowconclave the page title is Lucknow Conclave | Alexis Society | Townscript I read somewhere that it's not necessary to put your company's name in the title tag. Is it right? Please help!
On-Page Optimization | | sanchitmalik0 -
Important keywords in product names
Hi! among other we sell motorcycle clothing, which you can buy as a set (both jacket and pants) or single piece. Currently we name the products with the labeling in the beginning, e.g: Motorcycle pants R2000, Motorcycle jacket R2000, Motorcycle kit R2000 Motorcycle pants R4000, Motorcycle jacket R4000, Motorcycle kit R4000 This is causing keyword stuffing and cannibalization in the category pages as all the product names include important keywords. On the other hand it would be beneficial to keep the labeling in the name for search queries for the exact product. What be your recommendations? I tend to take the labeling away.
On-Page Optimization | | RomiSverige0 -
Transferring authority from one domain to another
My dilemma For example: If I have a website ranking at number 11 for (Keyword) and there is a site named www.(Keyword).com ranking at number 12 for (Keyword), if I were to buy this site and redirect to my own site, would this be at all beneficial? Any advice would be much appreciated!
On-Page Optimization | | CMoore850 -
Is it better to include the secondary keyword or site name in a title tag?
When I add a site name to my title tag with long-tailed primary and secondary keywords the title tag is longer than 70 characters. I need to include all three parts, so what should I do? At 70 characters the site name is usually partially cut off. I do not want to get penalized by Google, but I need to include the site name to have consistency. I am using the format Primary Keyword-Secondary Keyword | Site name
On-Page Optimization | | lwilkins0 -
Www1 and www domain
hi, I have a client who has an e-commerce business. My client does not want to fill the pages with too much content and has set up a www1 version with the same domain-name as the www. The plan is to create a lot of content and push www1 in ranking and then sending users (via links) to the www for ordering. Although there will be no duplicate content published on www and www1 this seems like an odd strategy, especially since the www already has a good page rank, and I'm not sure about how engines view a www.domain.com and www1domain.com situation even with unique content in each. Any thoughts?
On-Page Optimization | | vibelingo0 -
Change in Product Name
My site - http://www.guru99.com/quick-test-professional-qtp-tutorial.html Currently caters to an automation testing product from HP called Quick Test Professional popularly know and searched as QTP Recently HP changed the product name from QTP to HP Functional Test. Considering this , what do I do with exiting QTP pages and how do I optimize the site moving ahead...
On-Page Optimization | | krishrun0 -
301 redirect (www.domain.com/index to www.domain.com)
Hello, Please let me know what are the exact right steps in order to get rid of the duplicate content issues related with: www.domain.com/index.html same as www.domain.com without creating an infinite loop. Do you have a step by step guide posted within seomoz including 301 redirect for non www to www for all urls and index.whatever to main domain name without going into a infinite loop ? btw how to you spot the loop ? is it obvious like never ending refresh of the home page ? thanks a lot !
On-Page Optimization | | eyepaq2