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
-
Ranking & Visibility suddenly Down for my website
Any google updates or, can anyone tell me what google running, web ranking down, majority keywords showing on 1st pages right now those are on 3rd page, so is there any specific reason, or any solutions plz.. this s my website www.iqlance.com can anyone help me to audit and what was the issues facing exactly..
On-Page Optimization | | harry5501 -
Random /feed 404 error from a wordpress site
My Moz Analytics report shows a 404 error on a page which I think should not exist at all. The URL is http://henryplumbingco.com/portfolio-item/butler-elementary/feed/. When I checked webmaster tools, it looks like there are a number of random /feed urls throwing 404 errors. I am using WordPress and the Enfold theme. Anyone know how to get rid of these errors? Thanks,
On-Page Optimization | | aj6130 -
Does CTR Affect Ranking & Authority? Can PPC Influence That Too?
Hi everyone, Good CTR and bounce rate seem to affect rankings positively, but what about domain authority? Is that something built entirely on links and semantics, or does CTR play a factor too? Consider a homepage ranking for its brand name. Switching off any brand PPC will increase the natural listing's CTR. Would that have a positive SEO impact on the homepage/domain?
On-Page Optimization | | tprg0 -
Does 'XXX' in Domain get filtered by Google
I have a friend that has xxx in there domain and they are a religious based sex/porn addiction company but they don't show up for the queries that they are optimized against. They have a 12+ year old domain, all good health signs in quality links and press from trusted companies. Google sends them adult traffic, mostly 'trolls' and not the users they are looking for. Has anyone experienced domain word filtering and have a work around or solution? I posted in the Google Webmaster help forums and that community seems a little 'high on their horses' and are trying to hard to be cool. I am not too religious and don't necessarily support the views of the website but just trying to help a friend of a friend with a topic that I have never encountered. here is the url: xxxchurch.com Thanks, Brian
On-Page Optimization | | Add3.com0 -
Moving a site from .cfm to Wordpress - How to keep the authority?
Hi guys, My client has a site built with Cold Fusion (web pages end in .cfm) and we're moving them over to Wordpress (for many reasons), keeping the same menu structure and navigation. Their previous SEO company was pretty awful, however, they did manage to establish some decent authority/backlinks for the website and its 20 or so pages. My questions: I assume I'll want to do 301 redirects for each page, possibly by editing the .htaccess file? Any advice on this? Anything else I need to consider in this move? Thanks!
On-Page Optimization | | alpen0 -
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 -
How long is too long for domain URL length?
I noticed one of the negatively correlated ranking factors was length of URL. I'm building a page from scratch, we are trying to rank for 'Minneapolis Fitness' and 'Minneapolis Massage'. Is www.minnnepolismassageandfitness.com just ridiculously long? Or does the exact match outweigh the penalty for URL length?
On-Page Optimization | | JesseCWalker2 -
How to optimize a wordpress blog
I’m helping a client optimize a word press blog, and I’m not that familiar with Wordpress. The site is www.athleticfoodie.com. At first I was treating it like a normal website, where the categories would be optimized like pages on a website. However, I now realize that categories don’t have any content on them, so I can’t really optimize anything other than the names. Are the following things the best way to handle on-page optimization for a blog? Optimizing the homepage & domain: Find ways to incorporate the most important keywords into the elements on the main frame of the site: Navigation menu, Widgets, Category names, Alt Images. Optimizing the categories: For the posts within the categories (i.e., photos), work to make sure the category keywords are worked into the post titles (but not too much to seem spammy) Optimizing specific posts. Work keywords into the text and images. Any other suggestions would be greatly appreciated.
On-Page Optimization | | EricVallee340